public function EntityQueryTest::testAccessCheckSpecified in Drupal 10
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php \Drupal\KernelTests\Core\Entity\EntityQueryTest::testAccessCheckSpecified()
Test the accessCheck method is called.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityQueryTest.php, line 1363
Class
- EntityQueryTest
- Tests Entity Query functionality.
Namespace
Drupal\KernelTests\Core\EntityCode
public function testAccessCheckSpecified() {
$this
->expectException(QueryException::class);
$this
->expectExceptionMessage('Entity queries must explicitly set whether the query should be access checked or not. See Drupal\\Core\\Entity\\Query\\QueryInterface::accessCheck().');
$this->storage
->getQuery()
->execute();
}