diff --git a/core/modules/aggregator/aggregator.install b/core/modules/aggregator/aggregator.install index 7949a9a..e145abe 100644 --- a/core/modules/aggregator/aggregator.install +++ b/core/modules/aggregator/aggregator.install @@ -334,4 +334,4 @@ function aggregator_update_8001() { db_update('aggregator_item') ->fields(array('langcode' => LANGUAGE_DEFAULT)) ->execute(); -} \ No newline at end of file +} diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Tests/FeedLanguageTest.php b/core/modules/aggregator/lib/Drupal/aggregator/Tests/FeedLanguageTest.php index aabb154..611638a 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Tests/FeedLanguageTest.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Tests/FeedLanguageTest.php @@ -49,7 +49,6 @@ public function setUp() { language_save($language); $this->langcodes[$i] = $language; } - $this->createSampleNodes(); } /** @@ -65,15 +64,18 @@ public function testFeedLanguage() { $this->assertEqual($feeds[1]->language()->langcode, $this->langcodes[1]->langcode); $this->assertEqual($feeds[2]->language()->langcode, $this->langcodes[2]->langcode); + // Create example nodes to create feed items from and then update the feeds. + $this->createSampleNodes(); $this->cronRun(); // Loop over the created feed items and verify that their language matches // the one from the feed. foreach ($feeds as $feed) { $items = entity_load_multiple_by_properties('aggregator_item', array('fid' => $feed->id())); + $this->assertTrue(count($items) > 0, 'Feed items were created.'); foreach ($items as $item) { $this->assertEqual($item->language()->langcode, $feed->language()->langcode); } } } -} \ No newline at end of file +}