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

isDirtyReturnsFalseForCleanNestedArrays() public method

    public function isDirtyReturnsFalseForCleanNestedArrays()
    {
        $object = new \stdClass();
        $object->Persistence_Object_Identifier = 'cleanHash';
        $array = [[$object]];
        $className = 'Class' . md5(uniqid(mt_rand(), true));
        eval('class ' . $className . ' { public $array; }');
        $parent = new $className();
        $parent->array = $array;
        $cleanData = ['identifier' => 'fakeUuid', 'properties' => ['array' => ['type' => 'array', 'multivalue' => true, 'value' => [['type' => 'array', 'index' => 0, 'value' => [['type' => 'Some\\Object', 'index' => 0, 'value' => ['identifier' => 'cleanHash']]]]]]]];
        $session = $this->getMockBuilder(Persistence\Generic\Session::class)->setMethods(['getIdentifierByObject', 'isSingleValuedPropertyDirty'])->getMock();
        $session->registerReconstitutedEntity($parent, $cleanData);
        $session->expects($this->once())->method('getIdentifierByObject')->will($this->returnValue('fakeUuid'));
        $session->expects($this->once())->method('isSingleValuedPropertyDirty')->will($this->returnValue(false));
        $this->assertFalse($session->isDirty($parent, 'array'));
    }