class RestResourceConfigTest
Same name in this branch
- 9 core/modules/jsonapi/tests/src/Functional/RestResourceConfigTest.php \Drupal\Tests\jsonapi\Functional\RestResourceConfigTest
- 9 core/modules/rest/tests/src/Unit/Entity/RestResourceConfigTest.php \Drupal\Tests\rest\Unit\Entity\RestResourceConfigTest
- 9 core/modules/rest/tests/src/Kernel/Entity/RestResourceConfigTest.php \Drupal\Tests\rest\Kernel\Entity\RestResourceConfigTest
Same name and namespace in other branches
- 11.x core/modules/jsonapi/tests/src/Functional/RestResourceConfigTest.php \Drupal\Tests\jsonapi\Functional\RestResourceConfigTest
- 11.x core/modules/rest/tests/src/Unit/Entity/RestResourceConfigTest.php \Drupal\Tests\rest\Unit\Entity\RestResourceConfigTest
- 11.x core/modules/rest/tests/src/Kernel/Entity/RestResourceConfigTest.php \Drupal\Tests\rest\Kernel\Entity\RestResourceConfigTest
- 10 core/modules/jsonapi/tests/src/Functional/RestResourceConfigTest.php \Drupal\Tests\jsonapi\Functional\RestResourceConfigTest
- 10 core/modules/rest/tests/src/Unit/Entity/RestResourceConfigTest.php \Drupal\Tests\rest\Unit\Entity\RestResourceConfigTest
- 10 core/modules/rest/tests/src/Kernel/Entity/RestResourceConfigTest.php \Drupal\Tests\rest\Kernel\Entity\RestResourceConfigTest
- 8.9.x core/modules/jsonapi/tests/src/Functional/RestResourceConfigTest.php \Drupal\Tests\jsonapi\Functional\RestResourceConfigTest
- 8.9.x core/modules/rest/tests/src/Unit/Entity/RestResourceConfigTest.php \Drupal\Tests\rest\Unit\Entity\RestResourceConfigTest
- 8.9.x core/modules/rest/tests/src/Kernel/Entity/RestResourceConfigTest.php \Drupal\Tests\rest\Kernel\Entity\RestResourceConfigTest
@coversDefaultClass \Drupal\rest\Entity\RestResourceConfig
@group hal @group legacy
Hierarchy
- class \Drupal\KernelTests\KernelTestBase implements \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\hal\Kernel\rest\Entity\RestResourceConfigTest extends \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of RestResourceConfigTest
File
-
core/
modules/ hal/ tests/ src/ Kernel/ rest/ Entity/ RestResourceConfigTest.php, line 15
Namespace
Drupal\Tests\hal\Kernel\rest\EntityView source
class RestResourceConfigTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'rest',
'entity_test',
'serialization',
'basic_auth',
'user',
'hal',
];
/**
* @covers ::calculateDependencies
*/
public function testCalculateDependencies() {
$rest_config = RestResourceConfig::create([
'plugin_id' => 'entity:entity_test',
'granularity' => RestResourceConfigInterface::METHOD_GRANULARITY,
'configuration' => [
'GET' => [
'supported_auth' => [
'cookie',
],
'supported_formats' => [
'json',
],
],
'POST' => [
'supported_auth' => [
'basic_auth',
],
'supported_formats' => [
'hal_json',
],
],
],
]);
$rest_config->calculateDependencies();
$this->assertEquals([
'module' => [
'basic_auth',
'entity_test',
'hal',
'serialization',
'user',
],
], $rest_config->getDependencies());
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.