function FilterTest::savePaintingType

Same name and namespace in other branches
  1. 9 core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php \Drupal\Tests\jsonapi\Kernel\Query\FilterTest::savePaintingType()
  2. 8.9.x core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php \Drupal\Tests\jsonapi\Kernel\Query\FilterTest::savePaintingType()
  3. 10 core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php \Drupal\Tests\jsonapi\Kernel\Query\FilterTest::savePaintingType()

Creates a painting node type.

1 call to FilterTest::savePaintingType()
FilterTest::setUp in core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php

File

core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php, line 284

Class

FilterTest
@coversDefaultClass \Drupal\jsonapi\Query\Filter[[api-linebreak]] @group jsonapi @group jsonapi_query

Namespace

Drupal\Tests\jsonapi\Kernel\Query

Code

protected function savePaintingType() : void {
  NodeType::create([
    'type' => 'painting',
    'name' => 'Painting',
  ])->save();
  $this->createTextField('node', 'painting', 'colors', 'Colors', FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED);
  $this->createTextField('node', 'painting', 'shapes', 'Shapes', FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED);
  $this->createImageField('photo', 'node', 'painting');
}

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