function AggregatorTestBase::uniqueFeed
Same name and namespace in other branches
- 8.9.x core/modules/aggregator/src/Tests/AggregatorTestBase.php \Drupal\aggregator\Tests\AggregatorTestBase::uniqueFeed()
- 8.9.x 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/ tests/ src/ Functional/ AggregatorTestBase.php, line 260
Class
- AggregatorTestBase
- Defines a base class for testing the Aggregator module.
Namespace
Drupal\Tests\aggregator\FunctionalCode
public function uniqueFeed($feed_name, $feed_url) {
$result = \Drupal::entityQuery('aggregator_feed')->accessCheck(FALSE)
->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.