update.trigger.test 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * @file
  4. * Provides upgrade path tests for the Trigger module.
  5. */
  6. /**
  7. * Tests the Trigger 7.0 -> 7.x upgrade path.
  8. */
  9. class TriggerUpdatePathTestCase extends UpdatePathTestCase {
  10. public static function getInfo() {
  11. return array(
  12. 'name' => 'Trigger update path',
  13. 'description' => 'Trigger update path tests.',
  14. 'group' => 'Upgrade path',
  15. );
  16. }
  17. public function setUp() {
  18. // Use the filled upgrade path and our trigger data.
  19. $this->databaseDumpFiles = array(
  20. drupal_get_path('module', 'simpletest') . '/tests/upgrade/drupal-7.filled.standard_all.database.php.gz',
  21. drupal_get_path('module', 'simpletest') . '/tests/upgrade/drupal-7.trigger.database.php',
  22. );
  23. parent::setUp();
  24. // Our test data includes node and comment trigger assignments.
  25. $this->uninstallModulesExcept(array('comment', 'trigger'));
  26. }
  27. /**
  28. * Tests that the upgrade is successful.
  29. */
  30. public function testFilledUpgrade() {
  31. $this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
  32. }
  33. }