1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* @copyright Vertex. All rights reserved. https://www.vertexinc.com/
* @author Mediotype https://www.mediotype.com/
*/
namespace Vertex\Tax\Test\Unit\Model\Calculation;
use Magento\Tax\Api\Data\TaxDetailsItemInterfaceFactory;
use Magento\Tax\Api\Data\AppliedTaxInterfaceFactory;
use Magento\Tax\Api\Data\AppliedTaxRateInterfaceFactory;
use Vertex\Tax\Model\Calculation\VertexCalculator;
use Vertex\Tax\Test\Unit\TestCase;
/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class VertexCalculatorTest extends TestCase
{
/**
* @covers \Vertex\Tax\Model\Calculation\VertexCalculator::__construct()
*/
public function testConstructorThrowsNoErrors()
{
$taxDetailsItemDataObjectFactory = $this->getMockBuilder(TaxDetailsItemInterfaceFactory::class)
->disableOriginalConstructor()
->getMock();
$appliedTaxDataObjectFactory = $this->getMockBuilder(AppliedTaxInterfaceFactory::class)
->disableOriginalConstructor()
->getMock();
$appliedTaxRateDataObjectFactory = $this->getMockBuilder(AppliedTaxRateInterfaceFactory::class)
->disableOriginalConstructor()
->getMock();
$this->getObject(
VertexCalculator::class,
[
'taxDetailsItemDataObjectFactory' => $taxDetailsItemDataObjectFactory,
'appliedtaxDataObjectFactory' => $appliedTaxDataObjectFactory,
'appliedtaxRateDataObjectFactory' => $appliedTaxRateDataObjectFactory,
]
);
$this->assertTrue(true); // no exceptions have occurred.
}
}