function JsonApiSpecTest::testIsValidMemberName

Same name in other branches
  1. 8.9.x core/modules/jsonapi/tests/src/Unit/JsonApiSpecTest.php \Drupal\Tests\jsonapi\Unit\JsonApiSpecTest::testIsValidMemberName()
  2. 10 core/modules/jsonapi/tests/src/Unit/JsonApiSpecTest.php \Drupal\Tests\jsonapi\Unit\JsonApiSpecTest::testIsValidMemberName()
  3. 11.x core/modules/jsonapi/tests/src/Unit/JsonApiSpecTest.php \Drupal\Tests\jsonapi\Unit\JsonApiSpecTest::testIsValidMemberName()

Ensures that member names are properly validated.

@dataProvider providerTestIsValidMemberName @covers ::isValidMemberName

File

core/modules/jsonapi/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));
}

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