Exemplo n.º 1
0
 public function testProcess()
 {
     $context = new CollectPublicResourcesContext();
     $context->setVersion(Version::LATEST);
     $this->configBag->expects($this->once())->method('getConfigs')->with(Version::LATEST)->willReturn(['Test\\Entity1' => null, 'Test\\Entity2' => null]);
     $this->processor->process($context);
     $this->assertEquals([new PublicResource('Test\\Entity1'), new PublicResource('Test\\Entity2')], $context->getResult()->toArray());
 }
 public function testProcess()
 {
     $context = new CollectPublicResourcesContext();
     $context->setVersion(Version::LATEST);
     $context->getResult()->add(new PublicResource('Test\\Entity1'));
     $context->getResult()->add(new PublicResource('Test\\Entity2'));
     $this->entityExclusionProvider->expects($this->exactly(2))->method('isIgnoredEntity')->willReturnMap([['Test\\Entity1', true], ['Test\\Entity1', false]]);
     $this->processor->process($context);
     $this->assertEquals([1 => new PublicResource('Test\\Entity2')], $context->getResult()->toArray());
 }