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