4 * Tests schema changes in aggregator.module.
6 class AggregatorUpdatePathTestCase extends UpdatePathTestCase {
8 public static function getInfo() {
10 'name' => 'Aggregator update path',
11 'description' => 'Aggregator update path tests.',
12 'group' => 'Upgrade path',
16 public function setUp() {
17 // Use the normal installation and add our feed data.
18 $path = drupal_get_path('module', 'simpletest') . '/tests/upgrade';
19 $this->databaseDumpFiles = array(
20 $path . '/drupal-7.bare.standard_all.database.php.gz',
21 $path . '/drupal-7.aggregator.database.php',
25 // Our test data only relies on aggregator.module.
26 $this->uninstallModulesExcept(array('aggregator'));
30 * Tests that the aggregator.module update is successful.
32 public function testAggregatorUpdate() {
33 // Get a selection of the fields affected by the schema update.
34 $query = db_select('aggregator_feed', 'af');
35 $query->join('aggregator_item', 'ai', 'af.fid = ai.fid');
37 ->fields('af', array('url', 'link'))
38 ->fields('ai', array('link', 'guid'));
40 $pre_update_data = $query->execute()->fetchAll();
41 $this->assertTrue($this->performUpgrade(), 'The update was completed successfully.');
42 $post_update_data = $query->execute()->fetchAll();
44 $this->assertTrue($pre_update_data == $post_update_data, 'Feed data was preserved during the update.');