public function testFooFlushShouldWork() { $aclMock = $this->getMockBuilder('\\Shopware_Components_Acl')->disableOriginalConstructor()->getMock(); $aclMock->expects($this->any())->method('isAllowed')->will($this->returnValue(true)); $this->resource->setRole('dummy'); $this->resource->setAcl($aclMock); $this->assertNull($this->resource->checkPrivilege('test')); }
/** * @expectedException \Shopware\Components\Api\Exception\ParameterMissingException */ public function testGetOneWithMissingIdShouldThrowParameterMissingException() { $this->resource->getOne(''); }