function QueryTest::testNoRevisionTable

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Entity/Query/Sql/QueryTest.php \Drupal\Tests\Core\Entity\Query\Sql\QueryTest::testNoRevisionTable()
  2. 8.9.x core/tests/Drupal/Tests/Core/Entity/Query/Sql/QueryTest.php \Drupal\Tests\Core\Entity\Query\Sql\QueryTest::testNoRevisionTable()
  3. 10 core/tests/Drupal/Tests/Core/Entity/Query/Sql/QueryTest.php \Drupal\Tests\Core\Entity\Query\Sql\QueryTest::testNoRevisionTable()

Tests revision entity query for entity type without revision table.

@covers ::prepare

File

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

Class

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

Namespace

Drupal\Tests\Core\Entity\Query\Sql

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.