Pull merge.
[yaffs-website] / web / core / modules / aggregator / tests / src / Functional / DeleteFeedTest.php
index 7d7569628154cc0911ae7b5fe986039a155b45d1..7f6a4087f750c803a88aa253fb0ac584860d981c 100644 (file)
@@ -40,11 +40,11 @@ class DeleteFeedTest extends AggregatorTestBase {
 
     // Check feed source.
     $this->drupalGet('aggregator/sources/' . $feed1->id());
-    $this->assertResponse(404, 'Deleted feed source does not exists.');
+    $this->assertResponse(404, 'Deleted feed source does not exist.');
 
     // Check database for feed.
-    $result = db_query("SELECT COUNT(*) FROM {aggregator_feed} WHERE title = :title AND url = :url", [':title' => $feed1->label(), ':url' => $feed1->getUrl()])->fetchField();
-    $this->assertFalse($result, 'Feed not found in database');
+    $result = \Drupal::entityQuery('aggregator_feed')->condition('title', $feed1->label())->condition('url', $feed1->getUrl())->count()->execute();
+    $this->assertEquals(0, $result, 'Feed not found in database');
   }
 
 }