You are here

protected function QueryTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 30
Contains \Drupal\Tests\Core\Entity\Query\Sql\QueryTest.

Class

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

Namespace

Drupal\Tests\Core\Entity\Query\Sql

Code

protected function setUp() {
  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);
}