Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Protected Member Functions | Protected Attributes
TaxTest Class Reference
Inheritance diagram for TaxTest:

Protected Member Functions

 setUp ()
 

Protected Attributes

 $_model
 

Detailed Description

@magentoDataFixture Magento/Customer/_files/customer_sample.php @magentoDataFixture Magento/Catalog/_files/products.php @magentoDataFixture Magento/Weee/_files/product_with_fpt.php @SuppressWarnings(PHPMD.CouplingBetweenObjects)

Definition at line 18 of file TaxTest.php.

Member Function Documentation

◆ setUp()

setUp ( )
protected

Definition at line 30 of file TaxTest.php.

31  {
33  $weeeConfig = $this->createMock(\Magento\Weee\Model\Config::class);
34  $weeeConfig->expects($this->any())->method('isEnabled')->will($this->returnValue(true));
35  $weeeConfig->expects($this->any())->method('isTaxable')->will($this->returnValue(true));
36  $attribute = $this->createMock(\Magento\Eav\Model\Entity\Attribute::class);
37  $attribute->expects($this->any())->method('getAttributeCodesByFrontendType')->will(
38  $this->returnValue(['weee'])
39  );
40  $attributeFactory = $this->createPartialMock(\Magento\Eav\Model\Entity\AttributeFactory::class, ['create']);
41  $attributeFactory->expects($this->any())->method('create')->will($this->returnValue($attribute));
42  $this->_model = $objectManager->create(
43  \Magento\Weee\Model\Tax::class,
44  ['weeeConfig' => $weeeConfig, 'attributeFactory' => $attributeFactory]
45  );
46  $this->_extensibleDataObjectConverter = $objectManager->get(
47  \Magento\Framework\Api\ExtensibleDataObjectConverter::class
48  );
49  }
$objectManager
Definition: bootstrap.php:17

Field Documentation

◆ $_model

$_model
protected

Definition at line 23 of file TaxTest.php.


The documentation for this class was generated from the following file: