Exemple #1
0
 /**
  * @dataProvider dataForCreateSwatchProductByFallback
  */
 public function testLoadVariationByFallback($product)
 {
     $this->createSwatchProduct($product);
     $this->prepareVariationCollection();
     $this->productCollectionMock->method('getFirstItem')->willReturn($this->productMock);
     $this->productMock->method('getId')->willReturn(95);
     $this->productModelFactoryMock->method('create')->willReturn($this->productMock);
     $this->productMock->method('load')->with(95)->will($this->returnSelf());
     $this->swatchHelperObject->loadVariationByFallback($this->productMock, ['color' => 31]);
 }