コード例 #1
0
ファイル: ResourceTest.php プロジェクト: GerDner/luck-docker
 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'));
 }
コード例 #2
0
ファイル: TestCase.php プロジェクト: GerDner/luck-docker
 /**
  * @expectedException \Shopware\Components\Api\Exception\ParameterMissingException
  */
 public function testGetOneWithMissingIdShouldThrowParameterMissingException()
 {
     $this->resource->getOne('');
 }