Пример #1
0
 public function testCreateNoLocale()
 {
     $i18n = $this->getMockBuilder('\\Aimeos\\Shop\\Base\\I18n')->disableOriginalConstructor()->getMock();
     $support = $this->getMockBuilder('\\Aimeos\\Shop\\Base\\Support')->disableOriginalConstructor()->getMock();
     $context = new \Aimeos\MShop\Context\Item\Standard();
     $context->setConfig(new \Aimeos\MW\Config\PHPArray());
     $object = new \Aimeos\Shop\Base\View($i18n, $support);
     $this->assertInstanceOf('\\Aimeos\\MW\\View\\Iface', $object->create($context, array()));
 }
Пример #2
0
 public function testCreate()
 {
     $config = new \Aimeos\MW\Config\PHPArray();
     $object = new \Aimeos\Shop\Base\View();
     /*		Breaks with orchestra/testbench
     
     		\Route::shouldReceive('input')->once()->with('site')->andReturn('unittest');
     		\Route::shouldReceive('input')->once()->with('locale')->andReturn('de');
     		\Route::shouldReceive('input')->once()->with('currency')->andReturn('EUR');
     
     		$routeMock = $this->getMockBuilder('\Illuminate\Routing\Route')
     			->setMethods( array('parameters') )->disableOriginalConstructor()->getMock();
     
     		$routeMock->expects( $this->once() )->method('parameters')
     			->will( $this->returnValue( array() ) );
     
     		\Route::shouldReceive('current')->once()->andReturn($routeMock);
     		\Route::shouldReceive('currentRouteName')->once();
     */
     $this->assertInstanceOf('\\Aimeos\\MW\\View\\Iface', $object->create($config, array()));
 }