public function testVisitValueObjectSecondRuleParentMatch()
{
$data = new ValueObject();
$generator = $this->getMock('\\eZ\\Publish\\Core\\REST\\Common\\Output\\Generator');
$valueObjectVisitor1 = $this->getValueObjectVisitorMock();
$valueObjectVisitor2 = $this->getValueObjectVisitorMock();
$dispatcher = $this->getValueObjectDispatcher();
$dispatcher->addVisitor('WontMatch', $valueObjectVisitor1);
$dispatcher->addVisitor('stdClass', $valueObjectVisitor2);
$valueObjectVisitor1->expects($this->never())->method('visit');
$valueObjectVisitor2->expects($this->at(0))->method('visit')->with($this->getOutputVisitorMock(), $this->getOutputGeneratorMock(), $data);
$dispatcher->visit($data);
}