eZ\Publish\Core\Limitation\Tests\ContentTypeLimitationTypeTest::testValidatePass PHP Method

testValidatePass() public method

public testValidatePass ( eZ\Publish\API\Repository\Values\User\Limitation\ContentTypeLimitation $limitation )
$limitation eZ\Publish\API\Repository\Values\User\Limitation\ContentTypeLimitation
    public function testValidatePass(ContentTypeLimitation $limitation)
    {
        if (!empty($limitation->limitationValues)) {
            $this->getPersistenceMock()->expects($this->any())->method('contentTypeHandler')->will($this->returnValue($this->contentTypeHandlerMock));
            foreach ($limitation->limitationValues as $key => $value) {
                $this->contentTypeHandlerMock->expects($this->at($key))->method('load')->with($value);
            }
        }
        // Need to create inline instead of depending on testConstruct() to get correct mock instance
        $limitationType = $this->testConstruct();
        $validationErrors = $limitationType->validate($limitation);
        self::assertEmpty($validationErrors);
    }