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