/** * @test */ public function get_metadata_for_should_not_merge_with_superclasses_if_fails() { $this->loader->loadClassMetadata(Argument::type('Kcs\\Metadata\\ClassMetadataInterface'))->willReturn(false); $metadata = $this->prophesize('Kcs\\Metadata\\ClassMetadataInterface'); $metadata->merge(Argument::cetera())->shouldNotBeCalled(); $metadata->getReflectionClass()->willReturn(new \ReflectionClass($this)); $factory = new MockedClassMetadataFactory($this->loader->reveal()); $factory->mock = $metadata->reveal(); $factory->getMetadataFor($this); }