/** * {@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); }
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]); }