You are here

public function BlockContentTest::testPostIndividual in JSON:API 8

Tests POSTing an individual resource, plus edge cases to ensure good DX.

Overrides ResourceTestBase::testPostIndividual

File

tests/src/Functional/BlockContentTest.php, line 231

Class

BlockContentTest
JSON API integration test for the "BlockContent" content entity type.

Namespace

Drupal\Tests\jsonapi\Functional

Code

public function testPostIndividual() {

  // @todo Remove when JSON API requires Drupal 8.5 or newer.
  // @see https://www.drupal.org/project/drupal/issues/2835845#comment-12265016
  if (floatval(\Drupal::VERSION) < 8.5) {
    $this
      ->markTestSkipped('BlockContent entities were made publishable in 8.5, this is necessary for this test coverage to work.');
  }
  return parent::testGetIndividual();
}