Example #1
0
 /**
  * @dataProvider dataIsSwatchAttribute
  */
 public function testIsSwatchAttribute($times, $swatchType, $boolResult)
 {
     $this->attributeMock->method('hasData')->with('swatch_input_type')->willReturn(true);
     $this->attributeMock->expects($this->exactly($times))->method('getData')->with('swatch_input_type')->willReturn($swatchType);
     $result = $this->swatchHelperObject->isSwatchAttribute($this->attributeMock);
     if ($boolResult) {
         $this->assertTrue($result);
     } else {
         $this->assertFalse($result);
     }
 }