eZ\Publish\Core\REST\Server\Tests\Output\ValueObjectVisitor\OptionsTest::testVisit PHP Method

testVisit() public method

Test the NoContent visitor.
public testVisit ( ) : string
return string
    public function testVisit()
    {
        $visitor = $this->getVisitor();
        $generator = $this->getGenerator();
        $generator->startDocument(null);
        $noContent = new Values\Options(array('GET', 'POST'));
        $this->getVisitorMock()->expects($this->once())->method('setStatus')->with($this->equalTo(200));
        $this->getVisitorMock()->expects($this->exactly(2))->method('setHeader')->will($this->returnValueMap(array('Allow', 'GET,POST'), array('Content-Length', 0)));
        $visitor->visit($this->getVisitorMock(), $generator, $noContent);
    }