/** * Test isEverythingAllowed method * * @dataProvider isEverythingAllowedDataProvider * @param array $selectedResources * @param bool $expectedResult */ public function testIsEverythingAllowed($selectedResources, $expectedResult) { $apiRole = new Varien_Object(array('role_id' => 1)); $apiRole->setIdFieldName('role_id'); $this->_block->setApiRole($apiRole); $this->_ruleResource->expects($this->once())->method('getResourceIdsByRole')->with($apiRole->getId())->will($this->returnValue($selectedResources)); $this->assertEquals($expectedResult, $this->_block->isEverythingAllowed()); }