function ConfigurableLanguageResourceTestBase::testGetDefaultConfig
Same name in other branches
- 9 core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageResourceTestBase.php \Drupal\Tests\language\Functional\Rest\ConfigurableLanguageResourceTestBase::testGetDefaultConfig()
- 10 core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageResourceTestBase.php \Drupal\Tests\language\Functional\Rest\ConfigurableLanguageResourceTestBase::testGetDefaultConfig()
- 11.x core/modules/language/tests/src/Functional/Rest/ConfigurableLanguageResourceTestBase.php \Drupal\Tests\language\Functional\Rest\ConfigurableLanguageResourceTestBase::testGetDefaultConfig()
Test a GET request for a default config entity, which has a _core key.
See also
https://www.drupal.org/node/2915414
File
-
core/
modules/ language/ tests/ src/ Functional/ Rest/ ConfigurableLanguageResourceTestBase.php, line 83
Class
Namespace
Drupal\Tests\language\Functional\RestCode
public function testGetDefaultConfig() {
$this->initAuthentication();
$url = Url::fromUri('base:/entity/configurable_language/en')->setOption('query', [
'_format' => static::$format,
]);
$request_options = $this->getAuthenticationRequestOptions('GET');
$this->provisionEntityResource();
$this->setUpAuthorization('GET');
$response = $this->request('GET', $url, $request_options);
$normalization = $this->serializer
->decode((string) $response->getBody(), static::$format);
$this->assertArrayNotHasKey('_core', $normalization);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.