コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function findMetadataBySubject(MetadataSubjectInterface $metadataSubject)
 {
     $compiledMetadata = $this->metadataProvider->findMetadataBySubject($metadataSubject);
     if (null === $compiledMetadata) {
         return null;
     }
     return $this->metadataProcessor->process($compiledMetadata, ['subject' => $metadataSubject]);
 }
コード例 #2
0
 function it_does_not_process_returned_metadata_if_null(MetadataProviderInterface $metadataProvider, MetadataProcessorInterface $metadataProcessor, MetadataSubjectInterface $metadataSubject)
 {
     $metadataProvider->findMetadataBySubject($metadataSubject)->shouldBeCalled()->willReturn(null);
     $metadataProcessor->process(Argument::cetera())->shouldNotBeCalled();
     $this->findMetadataBySubject($metadataSubject)->shouldReturn(null);
 }