You are here

public function QueryTest::testNoBaseTable in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Entity/Query/Sql/QueryTest.php \Drupal\Tests\Core\Entity\Query\Sql\QueryTest::testNoBaseTable()
  2. 9 core/tests/Drupal/Tests/Core/Entity/Query/Sql/QueryTest.php \Drupal\Tests\Core\Entity\Query\Sql\QueryTest::testNoBaseTable()

Tests entity query for entity type without base table.

@covers ::prepare

File

core/tests/Drupal/Tests/Core/Entity/Query/Sql/QueryTest.php, line 41

Class

QueryTest
@coversDefaultClass \Drupal\Core\Entity\Query\Sql\Query @group Entity

Namespace

Drupal\Tests\Core\Entity\Query\Sql

Code

public function testNoBaseTable() {
  $this
    ->expectException(QueryException::class);
  $this
    ->expectExceptionMessage('No base table for example_entity_query, invalid query.');
  $this->query
    ->execute();
}