function AggregatorUpdatePathTestCase::testAggregatorUpdate
Tests that the aggregator.module update is successful.
File
-
modules/
simpletest/ tests/ upgrade/ update.aggregator.test, line 32
Class
- AggregatorUpdatePathTestCase
- @file Tests schema changes in aggregator.module.
Code
public function testAggregatorUpdate() {
// Get a selection of the fields affected by the schema update.
$query = db_select('aggregator_feed', 'af');
$query->join('aggregator_item', 'ai', 'af.fid = ai.fid');
$query->fields('af', array(
'url',
'link',
))
->fields('ai', array(
'link',
'guid',
));
$query->orderBy('ai.iid');
$pre_update_data = $query->execute()
->fetchAll();
$this->assertTrue($this->performUpgrade(), 'The update was completed successfully.');
$post_update_data = $query->execute()
->fetchAll();
$this->assertTrue($pre_update_data == $post_update_data, 'Feed data was preserved during the update.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.