You are here

protected function FilterTest::savePaintings in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php \Drupal\Tests\jsonapi\Kernel\Query\FilterTest::savePaintings()

Creates painting nodes.

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

File

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

Class

FilterTest
@coversDefaultClass \Drupal\jsonapi\Query\Filter @group jsonapi @group jsonapi_query

Namespace

Drupal\Tests\jsonapi\Kernel\Query

Code

protected function savePaintings($paintings) {
  foreach ($paintings as $painting) {
    Node::create(array_merge([
      'type' => 'painting',
    ], $painting))
      ->save();
  }
}