/** * @dataProvider providePublishWorkflowChecker */ public function testPublishWorkflowChecker($expected, $attributes, $content, $isMenuPusblishable, $isContentPublishable) { $attributes = (array) $attributes; $menuNode = $this->getMock('Symfony\\Cmf\\Bundle\\MenuBundle\\Model\\MenuNode'); $menuNode->expects($this->any())->method('getContent')->will($this->returnValue($content)); $this->pwfc->expects($this->any())->method('isGranted')->will($this->returnValue($isContentPublishable)); $this->assertEquals($expected, $this->voter->vote($this->token, $menuNode, $attributes)); }