// 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');
}
}