Neos\Flow\Tests\Unit\Property\TypeConverter\PersistentObjectConverterTest::getTypeOfChildPropertyShouldUseReflectionServiceToDetermineType PHP Метод

getTypeOfChildPropertyShouldUseReflectionServiceToDetermineType() публичный Метод

    public function getTypeOfChildPropertyShouldUseReflectionServiceToDetermineType()
    {
        $mockSchema = $this->getMockBuilder(ClassSchema::class)->disableOriginalConstructor()->getMock();
        $this->mockReflectionService->expects($this->any())->method('getClassSchema')->with('TheTargetType')->will($this->returnValue($mockSchema));
        $mockSchema->expects($this->any())->method('hasProperty')->with('thePropertyName')->will($this->returnValue(true));
        $mockSchema->expects($this->any())->method('getProperty')->with('thePropertyName')->will($this->returnValue(['type' => 'TheTypeOfSubObject', 'elementType' => null]));
        $configuration = $this->buildConfiguration([]);
        $this->assertEquals('TheTypeOfSubObject', $this->converter->getTypeOfChildProperty('TheTargetType', 'thePropertyName', $configuration));
    }