You are here

public function JsonApiSpecTest::testIsValidMemberName in JSON:API 8

Same name and namespace in other branches
  1. 8.2 tests/src/Unit/JsonApiSpecTest.php \Drupal\Tests\jsonapi\Unit\JsonApiSpecTest::testIsValidMemberName()

Ensures that member names are properly validated.

@dataProvider providerTestIsValidMemberName @covers ::isValidMemberName

File

tests/src/Unit/JsonApiSpecTest.php, line 22

Class

JsonApiSpecTest
@coversDefaultClass \Drupal\jsonapi\JsonApiSpec @group jsonapi

Namespace

Drupal\Tests\jsonapi\Unit

Code

public function testIsValidMemberName($member_name, $expected) {
  $this
    ->assertSame($expected, JsonApiSpec::isValidMemberName($member_name));
}