1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- class AggregatorUpdatePathTestCase extends UpdatePathTestCase {
- public static function getInfo() {
- return array(
- 'name' => 'Aggregator update path',
- 'description' => 'Aggregator update path tests.',
- 'group' => 'Upgrade path',
- );
- }
- public function setUp() {
-
- $path = drupal_get_path('module', 'simpletest') . '/tests/upgrade';
- $this->databaseDumpFiles = array(
- $path . '/drupal-7.bare.standard_all.database.php.gz',
- $path . '/drupal-7.aggregator.database.php',
- );
- parent::setUp();
-
- $this->uninstallModulesExcept(array('aggregator'));
- }
-
- public function testAggregatorUpdate() {
-
- $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.');
- }
- }
|