22 $this->typeConfigMock = $this->createMock(\
Magento\Catalog\Model\
ProductTypes\ConfigInterface::class);
24 $salesSetup = $this->createMock(\
Magento\Sales\Setup\SalesSetup::class);
25 $salesSetupFactory = $this->createPartialMock(\
Magento\Sales\Setup\SalesSetupFactory::class, [
'create']);
26 $salesSetupFactory->expects($this->any())->method(
'create')->will($this->returnValue($salesSetup));
28 $helper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
29 $this->taxSetup =
$helper->getObject(
30 \
Magento\Tax\Setup\TaxSetup::class,
32 'productTypeConfig' => $this->typeConfigMock,
33 'salesSetupFactory' => $salesSetupFactory,
40 $refundable = [
'simple',
'simple2'];
41 $this->typeConfigMock->expects(
48 $this->returnValue($refundable)
50 $this->assertEquals($refundable, $this->taxSetup->getTaxableItems());