upgrade.trigger.test 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * @file
  4. * Provides upgrade path tests for the Trigger module.
  5. */
  6. /**
  7. * Tests the Trigger 6 -> 7 upgrade path.
  8. */
  9. class UpgradePathTriggerTestCase extends UpgradePathTestCase {
  10. public static function getInfo() {
  11. return array(
  12. 'name' => 'Trigger upgrade path',
  13. 'description' => 'Trigger upgrade path tests for Drupal 6.x.',
  14. 'group' => 'Upgrade path',
  15. );
  16. }
  17. public function setUp() {
  18. // Path to the database dump.
  19. $this->databaseDumpFiles = array(
  20. drupal_get_path('module', 'simpletest') . '/tests/upgrade/drupal-6.filled.database.php',
  21. drupal_get_path('module', 'simpletest') . '/tests/upgrade/drupal-6.trigger.database.php',
  22. );
  23. parent::setUp();
  24. }
  25. /**
  26. * Basic tests for the trigger upgrade.
  27. */
  28. public function testTaxonomyUpgrade() {
  29. $this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
  30. $this->drupalGet('admin/structure/trigger/node');
  31. $this->assertRaw('<td>'. t('Make post sticky') .'</td>');
  32. $this->assertRaw('<td>'. t('Publish post') .'</td>');
  33. $this->drupalGet('admin/structure/trigger/comment');
  34. $this->assertRaw('<td>'. t('Publish comment') .'</td>');
  35. }
  36. }