public function ResourceTypeRepositoryTest::testAll in JSON:API 8
Same name and namespace in other branches
- 8.2 tests/src/Kernel/ResourceType/ResourceTypeRepositoryTest.php \Drupal\Tests\jsonapi\Kernel\ResourceType\ResourceTypeRepositoryTest::testAll()
@covers ::all
File
- tests/
src/ Kernel/ ResourceType/ ResourceTypeRepositoryTest.php, line 61
Class
- ResourceTypeRepositoryTest
- @coversDefaultClass \Drupal\jsonapi\ResourceType\ResourceTypeRepository @group jsonapi @group legacy
Namespace
Drupal\Tests\jsonapi\Kernel\ResourceTypeCode
public function testAll() {
// Make sure that there are resources being created.
$all = $this->resourceTypeRepository
->all();
$this
->assertNotEmpty($all);
array_walk($all, function (ResourceType $resource_type) {
$this
->assertNotEmpty($resource_type
->getDeserializationTargetClass());
$this
->assertNotEmpty($resource_type
->getEntityTypeId());
$this
->assertNotEmpty($resource_type
->getTypeName());
});
}