Example #1
0
 /**
  * @dataProvider dataForIsVisualSwatchType
  */
 public function testIsVisualSwatchFalse($data, $count, $swatchType, $boolResult)
 {
     $this->attributeMock->method('hasData')->with('swatch_input_type')->willReturn(false);
     $this->attributeMock->expects($this->exactly(2))->method('getData')->withConsecutive(['additional_data'], ['swatch_input_type'])->willReturnOnConsecutiveCalls($data, $swatchType);
     $this->attributeMock->expects($this->exactly($count['setData']))->method('setData');
     $result = $this->swatchHelperObject->isVisualSwatch($this->attributeMock);
     if ($boolResult) {
         $this->assertTrue($result);
     } else {
         $this->assertFalse($result);
     }
 }