コード例 #1
0
 /**
  * @param array $attribute1Sort
  * @param array $attribute2Sort
  * @param float $expected
  *
  * @dataProvider compareAttributesDataProvider
  */
 public function testCompareAttributes($attribute1Sort, $attribute2Sort, $expected)
 {
     $attribute1 = $this->getMock('Magento\\Eav\\Model\\Entity\\Attribute', ['__wakeup'], [], '', false);
     $attribute1->setAttributeSetInfo([0 => $attribute1Sort]);
     $attribute2 = $this->getMock('Magento\\Eav\\Model\\Entity\\Attribute', ['__wakeup'], [], '', false);
     $attribute2->setAttributeSetInfo([0 => $attribute2Sort]);
     $this->assertEquals($expected, $this->_model->attributesCompare($attribute1, $attribute2));
 }