public function ConfigEntityNormalizerTest::setUp in JSON:API 8
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ Normalizer/ ConfigEntityNormalizerTest.php, line 32
Class
- ConfigEntityNormalizerTest
- @coversDefaultClass \Drupal\jsonapi\Normalizer\ConfigEntityNormalizer @group jsonapi
Namespace
Drupal\Tests\jsonapi\Unit\NormalizerCode
public function setUp() {
$link_manager = $this
->prophesize(LinkManager::class);
$resource_type = new ResourceType('dolor', 'sid', NULL);
$resource_type
->setRelatableResourceTypes([]);
$resource_type_repository = $this
->prophesize(ResourceTypeRepository::class);
$resource_type_repository
->get(Argument::type('string'), Argument::type('string'))
->willReturn($resource_type);
$this->normalizer = new ConfigEntityNormalizer($link_manager
->reveal(), $resource_type_repository
->reveal(), $this
->prophesize(EntityTypeManagerInterface::class)
->reveal());
}