You are here

protected function QueryTest::setUp 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::setUp()
  2. 9 core/tests/Drupal/Tests/Core/Entity/Query/Sql/QueryTest.php \Drupal\Tests\Core\Entity\Query\Sql\QueryTest::setUp()

Overrides UnitTestCase::setUp

File

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

Class

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

Namespace

Drupal\Tests\Core\Entity\Query\Sql

Code

protected function setUp() : void {
  parent::setUp();
  $entity_type = new EntityType([
    'id' => 'example_entity_query',
  ]);
  $conjunction = 'AND';
  $connection = $this
    ->getMockBuilder('Drupal\\Core\\Database\\Connection')
    ->disableOriginalConstructor()
    ->getMock();
  $namespaces = [
    'Drupal\\Core\\Entity\\Query\\Sql',
  ];
  $this->query = new Query($entity_type, $conjunction, $connection, $namespaces);
}