Neos\Flow\Tests\Unit\Persistence\Generic\SessionTest::getCleanStateOfPropertyReturnsNullIfPropertyWasNotInObjectData PHP Method

getCleanStateOfPropertyReturnsNullIfPropertyWasNotInObjectData() public method

    public function getCleanStateOfPropertyReturnsNullIfPropertyWasNotInObjectData()
    {
        $entity = new \stdClass();
        $reconstitutedEntitiesData = ['abc' => ['properties' => ['foo' => ['type' => 'string']]]];
        $session = $this->getAccessibleMock(Persistence\Generic\Session::class, ['isReconstitutedEntity', 'getIdentifierByObject']);
        $session->_set('reconstitutedEntitiesData', $reconstitutedEntitiesData);
        $session->expects($this->any())->method('isReconstitutedEntity')->with($entity)->will($this->returnValue(true));
        $session->expects($this->any())->method('getIdentifierByObject')->with($entity)->will($this->returnValue('abc'));
        $state = $session->getCleanStateOfProperty($entity, 'bar');
        $this->assertNull($state);
    }