/** * @dataProvider workflowDataProvider * @param bool $expected */ public function testIsWorkflowActive($expected) { $entity = new \stdClass(); $this->workflowManager->expects($this->once())->method('isResetAllowed')->with($entity)->will($this->returnValue($expected)); $this->assertEquals($expected, $this->extension->isResetAllowed($entity)); }
/** * @dataProvider workflowsDataProvider * @param array $result * @param bool $expected */ public function testHasWorkflows($result, $expected) { $class = '\\stdClass'; $this->workflowRegistry->expects($this->once())->method('getWorkflowsByEntityClass')->with($class)->will($this->returnValue($result)); $this->assertEquals($expected, $this->extension->hasWorkflows($class)); }