protected function JsonApiDefaultsFunctionalTest::setResouceConfigValue in JSON:API Extras 8.3
Sets given key value combination on a resource config entity.
Parameters
array $values: Combination of keys and values to set on the resource config.
Throws
\Drupal\Core\Entity\EntityStorageException
2 calls to JsonApiDefaultsFunctionalTest::setResouceConfigValue()
- JsonApiDefaultsFunctionalTest::testPagination in modules/
jsonapi_defaults/ tests/ src/ Functional/ JsonApiDefaultsFunctionalTest.php - Checks standard pagination and page limit overrides.
- JsonApiDefaultsFunctionalTest::testRead in modules/
jsonapi_defaults/ tests/ src/ Functional/ JsonApiDefaultsFunctionalTest.php - Test the GET method.
File
- modules/
jsonapi_defaults/ tests/ src/ Functional/ JsonApiDefaultsFunctionalTest.php, line 219
Class
- JsonApiDefaultsFunctionalTest
- The test class for the JSON API Defaults functionality.
Namespace
Drupal\Tests\jsonapi_defaults\FunctionalCode
protected function setResouceConfigValue(array $values) {
$resource_config = JsonapiResourceConfig::load('node--article');
foreach ($values as $key => $value) {
$resource_config
->setThirdPartySetting('jsonapi_defaults', $key, $value);
}
$resource_config
->save();
}