function JsonApiSpecTest::providerTestIsValidCustomQueryParameter
Same name in other branches
- 8.9.x core/modules/jsonapi/tests/src/Unit/JsonApiSpecTest.php \Drupal\Tests\jsonapi\Unit\JsonApiSpecTest::providerTestIsValidCustomQueryParameter()
- 10 core/modules/jsonapi/tests/src/Unit/JsonApiSpecTest.php \Drupal\Tests\jsonapi\Unit\JsonApiSpecTest::providerTestIsValidCustomQueryParameter()
- 11.x core/modules/jsonapi/tests/src/Unit/JsonApiSpecTest.php \Drupal\Tests\jsonapi\Unit\JsonApiSpecTest::providerTestIsValidCustomQueryParameter()
Data provider for testIsValidCustomQueryParameter.
File
-
core/
modules/ jsonapi/ tests/ src/ Unit/ JsonApiSpecTest.php, line 110
Class
- JsonApiSpecTest
- @coversDefaultClass \Drupal\jsonapi\JsonApiSpec @group jsonapi
Namespace
Drupal\Tests\jsonapi\UnitCode
public function providerTestIsValidCustomQueryParameter() {
$data = $this->providerTestIsValidMemberName();
// All valid member names are also valid custom query parameters, except for
// single-character ones.
$data['single-character'][1] = FALSE;
// Custom query parameter test cases.
$data['custom-query-parameter-lowercase'] = [
'foobar',
FALSE,
];
$data['custom-query-parameter-dash'] = [
'foo-bar',
TRUE,
];
$data['custom-query-parameter-underscore'] = [
'foo_bar',
TRUE,
];
$data['custom-query-parameter-camelcase'] = [
'fooBar',
TRUE,
];
return $data;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.