예제 #1
0
 public function testSearchMShopException()
 {
     $object = $this->getMockBuilder('\\Aimeos\\Admin\\JQAdm\\Dashboard\\Standard')->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths()))->setMethods(array('getSubClients'))->getMock();
     $object->expects($this->once())->method('getSubClients')->will($this->throwException(new \Aimeos\MShop\Exception()));
     $object->setView($this->getViewNoRender());
     $object->search();
 }
예제 #2
0
 protected function setUp()
 {
     $this->context = \TestHelperJqadm::getContext();
     $templatePaths = \TestHelperJqadm::getTemplatePaths();
     $this->mock = $this->getMockBuilder('Aimeos\\Admin\\JQAdm\\Product\\Standard')->setMethods(array('delete', 'save'))->disableOriginalConstructor()->getMock();
     $this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Index($this->mock, $this->context, $templatePaths);
 }
예제 #3
0
 protected function setUp()
 {
     $this->context = \TestHelperJqadm::getContext();
     $templatePaths = \TestHelperJqadm::getTemplatePaths();
     $client = new \Aimeos\Admin\JQAdm\Product\Standard($this->context, $templatePaths);
     $this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Languages($client, $this->context, $templatePaths);
 }
예제 #4
0
 protected function setUp()
 {
     $this->view = \TestHelperJqadm::getView();
     $this->context = \TestHelperJqadm::getContext();
     $templatePaths = \TestHelperJqadm::getTemplatePaths();
     $this->object = new \Aimeos\Admin\JQAdm\Product\Category\Standard($this->context, $templatePaths);
     $this->object->setView($this->view);
 }
예제 #5
0
 public function testSaveMShopException()
 {
     $object = $this->getMockBuilder('\\Aimeos\\Admin\\JQAdm\\Product\\Characteristic\\Attribute\\Standard')->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths()))->setMethods(array('updateItems'))->getMock();
     $object->expects($this->once())->method('updateItems')->will($this->throwException(new \Aimeos\MShop\Exception()));
     $object->setView(\TestHelperJqadm::getView());
     $this->setExpectedException('\\Aimeos\\Admin\\JQAdm\\Exception');
     $object->save();
 }
예제 #6
0
 protected function setUp()
 {
     $this->cache = $this->getMockBuilder('Aimeos\\MW\\Cache\\None')->setMethods(array('deleteByTags'))->disableOriginalConstructor()->getMock();
     $this->mock = $this->getMockBuilder('Aimeos\\Admin\\JQAdm\\Product\\Category\\Standard')->setMethods(array('save'))->disableOriginalConstructor()->getMock();
     $templatePaths = \TestHelperJqadm::getTemplatePaths();
     $this->context = \TestHelperJqadm::getContext();
     $this->context->setCache($this->cache);
     $this->object = new \Aimeos\Admin\JQAdm\Product\Category\Decorator\Cache($this->mock, $this->context, $templatePaths);
 }
예제 #7
0
 protected function setUp()
 {
     $this->view = \TestHelperJqadm::getView();
     $request = $this->getMock('\\Psr\\Http\\Message\\ServerRequestInterface');
     $helper = new \Aimeos\MW\View\Helper\Request\Standard($this->view, $request, '127.0.0.1', 'test');
     $this->view->addHelper('request', $helper);
     $this->context = \TestHelperJqadm::getContext();
     $templatePaths = \TestHelperJqadm::getTemplatePaths();
     $this->object = new \Aimeos\Admin\JQAdm\Product\Standard($this->context, $templatePaths);
     $this->object->setView($this->view);
 }
예제 #8
0
 protected function setUp()
 {
     $this->view = \TestHelperJqadm::getView();
     $request = $this->getMock('\\Psr\\Http\\Message\\ServerRequestInterface');
     $helper = new \Aimeos\MW\View\Helper\Request\Standard($this->view, $request, '127.0.0.1', 'test');
     $this->view->addHelper('request', $helper);
     $this->context = \TestHelperJqadm::getContext();
     $templatePaths = \TestHelperJqadm::getTemplatePaths();
     $this->object = $this->getMockBuilder('\\Aimeos\\Admin\\JQAdm\\Product\\Download\\Standard')->setConstructorArgs(array($this->context, $templatePaths))->setMethods(array('storeFile'))->getMock();
     $this->object->setView($this->view);
 }
예제 #9
0
 protected function setUp()
 {
     $this->templatePaths = \TestHelperJqadm::getTemplatePaths();
     $this->context = \TestHelperJqadm::getContext();
     $this->context->setView(\TestHelperJqadm::getView());
 }