function AggregatorTestBase::uniqueFeed
Same name in this branch
- 8.9.x core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php \Drupal\Tests\aggregator\Functional\AggregatorTestBase::uniqueFeed()
Same name in other branches
- 9 core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php \Drupal\Tests\aggregator\Functional\AggregatorTestBase::uniqueFeed()
Checks whether the feed name and URL are unique.
Parameters
string $feed_name: String containing the feed name to check.
string $feed_url: String containing the feed url to check.
Return value
bool TRUE if feed is unique.
File
-
core/
modules/ aggregator/ src/ Tests/ AggregatorTestBase.php, line 254
Class
- AggregatorTestBase
- Defines a base class for testing the Aggregator module.
Namespace
Drupal\aggregator\TestsCode
public function uniqueFeed($feed_name, $feed_url) {
$result = \Drupal::entityQuery('aggregator_feed')->condition('title', $feed_name)
->condition('url', $feed_url)
->count()
->execute();
return 1 == $result;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.