public function testGetResources()
 {
     $version = '1.2.3';
     $requestType = [RequestType::REST, RequestType::JSON_API];
     $this->processor->expects($this->once())->method('process')->willReturnCallback(function (CollectPublicResourcesContext $context) use($version, $requestType) {
         $this->assertEquals($version, $context->getVersion());
         $this->assertEquals($requestType, $context->getRequestType());
         $context->getResult()->add(new PublicResource('Test\\Entity1'));
         $context->getResult()->set(2, new PublicResource('Test\\Entity3'));
     });
     $this->assertEquals([new PublicResource('Test\\Entity1'), new PublicResource('Test\\Entity3')], $this->loader->getResources($version, $requestType));
 }
 /**
  * @return array [[entity class, entity plural alias], ...]
  */
 protected function getSupportedEntities()
 {
     if (null === $this->supportedEntities) {
         $resources = $this->resourcesLoader->getResources(Version::LATEST, [RequestType::REST, RequestType::JSON_API]);
         $this->supportedEntities = [];
         foreach ($resources as $resource) {
             $className = $resource->getEntityClass();
             $pluralAlias = $this->entityAliasResolver->getPluralAlias($className);
             if (!empty($pluralAlias)) {
                 $this->supportedEntities[] = [$className, $pluralAlias];
             }
         }
     }
     return $this->supportedEntities;
 }