Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function process(MetadataInterface $metadata, array $options = [])
 {
     $metadata->forAll(function ($property) use($options) {
         return $this->processProperty($property, $options);
     });
     return $metadata;
 }
 function it_delegates_processing_directly_to_metadata(MetadataInterface $metadata)
 {
     $metadata->forAll(Argument::type('callable'))->shouldBeCalled();
     $this->process($metadata);
 }
Exemplo n.º 3
0
 function it_does_not_handle_exceptions_thrown_while_merging_metadata(MetadataInterface $childMetadata, MetadataInterface $parentMetadata)
 {
     $childMetadata->merge($parentMetadata)->shouldBeCalled()->willThrow('\\InvalidArgumentException');
     $this->shouldThrow('\\InvalidArgumentException')->duringCompile($childMetadata, [$parentMetadata]);
 }