diff --git a/core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php b/core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php index 2598faf104..fd2a742443 100644 --- a/core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php +++ b/core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php @@ -45,11 +45,11 @@ public function testUpdateFeedItem() { $this->assert(isset($view_link), 'The message area contains a link to a feed'); $fids = \Drupal::entityQuery('aggregator_feed')->condition('url', $edit['url[0][value]'])->execute(); - $feed = Feed::load($fids[0]); + $feed = Feed::load(array_values($fids)[0]); $feed->refreshItems(); $iids = \Drupal::entityQuery('aggregator_item')->condition('fid', $feed->id())->execute(); - $before = Item::load($iids[0])->getPostedTime(); + $before = Item::load(array_values($iids)[0])->getPostedTime(); // Sleep for 3 second. sleep(3); @@ -61,7 +61,7 @@ public function testUpdateFeedItem() { ->save(); $feed->refreshItems(); - $after = Item::load($iids[0])->getPostedTime(); + $after = Item::load(array_values($iids)[0])->getPostedTime(); $this->assertTrue($before === $after, format_string('Publish timestamp of feed item was not updated (@before === @after)', ['@before' => $before, '@after' => $after])); // Make sure updating items works even after uninstalling a module