public function FilterTest::setUp in Drupal 8
Same name in this branch
- 8 core/modules/views/tests/src/Functional/Plugin/FilterTest.php \Drupal\Tests\views\Functional\Plugin\FilterTest::setUp()
- 8 core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php \Drupal\Tests\jsonapi\Kernel\Query\FilterTest::setUp()
Same name and namespace in other branches
- 9 core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php \Drupal\Tests\jsonapi\Kernel\Query\FilterTest::setUp()
Overrides KernelTestBase::setUp
File
- core/
modules/ jsonapi/ tests/ src/ Kernel/ Query/ FilterTest.php, line 59
Class
- FilterTest
- @coversDefaultClass \Drupal\jsonapi\Query\Filter @group jsonapi @group jsonapi_query
Namespace
Drupal\Tests\jsonapi\Kernel\QueryCode
public function setUp() {
parent::setUp();
$this
->setUpSchemas();
$this
->savePaintingType();
// ((RED or CIRCLE) or (YELLOW and SQUARE))
$this
->savePaintings([
[
'colors' => [
'red',
],
'shapes' => [
'triangle',
],
'title' => 'FIND',
],
[
'colors' => [
'orange',
],
'shapes' => [
'circle',
],
'title' => 'FIND',
],
[
'colors' => [
'orange',
],
'shapes' => [
'triangle',
],
'title' => 'DO_NOT_FIND',
],
[
'colors' => [
'yellow',
],
'shapes' => [
'square',
],
'title' => 'FIND',
],
[
'colors' => [
'yellow',
],
'shapes' => [
'triangle',
],
'title' => 'DO_NOT_FIND',
],
[
'colors' => [
'orange',
],
'shapes' => [
'square',
],
'title' => 'DO_NOT_FIND',
],
]);
$this->nodeStorage = $this->container
->get('entity_type.manager')
->getStorage('node');
$this->fieldResolver = $this->container
->get('jsonapi.field_resolver');
$this->resourceTypeRepository = $this->container
->get('jsonapi.resource_type.repository');
}