示例#1
0
 public function testExecuteObtainsProductDataFromSession()
 {
     $this->action->getRequest()->expects($this->any())->method('getParam')->willReturn(true);
     $this->action->getRequest()->expects($this->any())->method('getFullActionName')->willReturn('catalog_product_new');
     $this->session->expects($this->any())->method('getProductData')->willReturn(['product' => ['name' => 'test-name']]);
     $this->product->expects($this->once())->method('addData')->with(['name' => 'test-name', 'stock_data' => null]);
     $this->action->executeInternal();
 }