eZ\Publish\Core\REST\Client\Tests\Output\ValueObjectVisitor\PolicyCreateStructTest::testVisit PHP Method

testVisit() public method

Tests the PolicyCreateStruct visitor.
public testVisit ( ) : string
return string
    public function testVisit()
    {
        $visitor = $this->getVisitor();
        $generator = $this->getGenerator();
        $generator->startDocument(null);
        $contentTypeLimitation = new \eZ\Publish\API\Repository\Values\User\Limitation\ContentTypeLimitation();
        $contentTypeLimitation->limitationValues = array(1, 2, 3);
        $policyCreateStruct = new User\PolicyCreateStruct('content', 'delete');
        $policyCreateStruct->addLimitation($contentTypeLimitation);
        $visitor->visit($this->getVisitorMock(), $generator, $policyCreateStruct);
        $result = $generator->endDocument(null);
        $this->assertNotNull($result);
        return $result;
    }