public function testIsAllowedReturnsTrueIfResourcesIsValidAndAllowed() { $this->_authorizationMock->expects($this->once())->method('isAllowed')->with('someResource')->will($this->returnValue(true)); $this->_model->setData(['resource' => 'someResource'], 'store'); $this->assertTrue($this->_model->isAllowed()); }