Neos\Flow\Tests\Unit\Persistence\Generic\DataMapperTest::thawPropertiesAssignsTheUuidToTheProxy PHP Method

thawPropertiesAssignsTheUuidToTheProxy() public method

After thawing the properties, the nodes' uuid will be available in the identifier property of the proxy class.
    public function thawPropertiesAssignsTheUuidToTheProxy()
    {
        $className = 'Class' . md5(uniqid(mt_rand(), true));
        eval('class ' . $className . ' { public $Flow_Persistence_Entity_UUID; }');
        $object = new $className();
        $objectData = ['identifier' => 'c254d2e0-825a-11de-8a39-0800200c9a66', 'classname' => 'TYPO3\\Post', 'properties' => []];
        $classSchema = new ClassSchema('TYPO3\\Post');
        $mockReflectionService = $this->createMock(ReflectionService::class);
        $mockReflectionService->expects($this->once())->method('getClassSchema')->will($this->returnValue($classSchema));
        $dataMapper = $this->getAccessibleMock(Persistence\Generic\DataMapper::class, ['dummy']);
        $dataMapper->injectReflectionService($mockReflectionService);
        $dataMapper->_call('thawProperties', $object, $objectData['identifier'], $objectData);
        $this->assertAttributeEquals('c254d2e0-825a-11de-8a39-0800200c9a66', 'Persistence_Object_Identifier', $object);
    }