ApiPlatform\Core\Tests\Metadata\Property\Factory\AnnotationPropertyMetadataFactoryTest::getDependencies PHP Method

getDependencies() public method

public getDependencies ( )
    public function getDependencies()
    {
        $annotation = new ApiProperty();
        $annotation->description = 'description';
        $annotation->readable = true;
        $annotation->writable = true;
        $annotation->readableLink = false;
        $annotation->writableLink = false;
        $annotation->identifier = false;
        $annotation->required = true;
        $annotation->iri = 'foo';
        $annotation->attributes = ['foo' => 'bar'];
        $propertyReaderProphecy = $this->prophesize(Reader::class);
        $propertyReaderProphecy->getPropertyAnnotation(Argument::type(\ReflectionProperty::class), ApiProperty::class)->willReturn($annotation)->shouldBeCalled();
        $getterReaderProphecy = $this->prophesize(Reader::class);
        $getterReaderProphecy->getPropertyAnnotation(Argument::type(\ReflectionProperty::class), ApiProperty::class)->willReturn(null)->shouldBeCalled();
        $getterReaderProphecy->getMethodAnnotation(Argument::type(\ReflectionMethod::class), ApiProperty::class)->willReturn($annotation)->shouldBeCalled();
        $setterReaderProphecy = $this->prophesize(Reader::class);
        $setterReaderProphecy->getPropertyAnnotation(Argument::type(\ReflectionProperty::class), ApiProperty::class)->willReturn(null)->shouldBeCalled();
        $setterReaderProphecy->getMethodAnnotation(Argument::type(\ReflectionMethod::class), ApiProperty::class)->willReturn(null)->shouldBeCalled();
        $setterReaderProphecy->getMethodAnnotation(Argument::type(\ReflectionMethod::class), ApiProperty::class)->willReturn($annotation)->shouldBeCalled();
        $decoratedThrowNotFoundProphecy = $this->prophesize(PropertyMetadataFactoryInterface::class);
        $decoratedThrowNotFoundProphecy->create(Dummy::class, 'name', [])->willThrow(new PropertyNotFoundException())->shouldBeCalled();
        $decoratedReturnProphecy = $this->prophesize(PropertyMetadataFactoryInterface::class);
        $decoratedReturnProphecy->create(Dummy::class, 'name', [])->willReturn(new PropertyMetadata(null, 'Hi'))->shouldBeCalled();
        return [[$propertyReaderProphecy, null, 'description'], [$getterReaderProphecy, $decoratedThrowNotFoundProphecy, 'description'], [$setterReaderProphecy, $decoratedThrowNotFoundProphecy, 'description'], [$setterReaderProphecy, $decoratedReturnProphecy, 'Hi']];
    }