Example #1
0
 /**
  * Tests the getCalculationSequence method
  *
  * @param bool $applyTaxAfterDiscount
  * @param bool $discountTaxIncl
  * @param string $expectedValue
  * @dataProvider dataProviderGetCalculationSequence
  */
 public function testGetCalculationSequence($applyTaxAfterDiscount, $discountTaxIncl, $expectedValue)
 {
     $scopeConfigMock = $this->getMockForAbstractClass('Magento\\Framework\\App\\Config\\ScopeConfigInterface');
     $scopeConfigMock->expects($this->at(0))->method('getValue')->will($this->returnValue($applyTaxAfterDiscount));
     $scopeConfigMock->expects($this->at(1))->method('getValue')->will($this->returnValue($discountTaxIncl));
     /** @var \Magento\Tax\Model\Config */
     $model = new Config($scopeConfigMock);
     $this->assertEquals($expectedValue, $model->getCalculationSequence());
 }