public function AggregatorUpdatePathTestCase::testAggregatorUpdate in Drupal 7
Tests that the aggregator.module update is successful.
File
- modules/
simpletest/ tests/ upgrade/ update.aggregator.test, line 32 - Tests schema changes in aggregator.module.
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',
));
$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.');
}