CommerceGuys\Tax\Tests\Resolver\ContextTest::testConstructor PHP Method

testConstructor() public method

public testConstructor ( )
    public function testConstructor()
    {
        $customerAddress = $this->getMockBuilder('CommerceGuys\\Addressing\\Address')->getMock();
        $storeAddress = $this->getMockBuilder('CommerceGuys\\Addressing\\Address')->getMock();
        $date = new \DateTime('2014-10-10');
        $context = new Context($customerAddress, $storeAddress, '0123', ['DE'], $date);
        $this->assertSame($customerAddress, $context->getCustomerAddress());
        $this->assertSame($storeAddress, $context->getStoreAddress());
        $this->assertEquals('0123', $context->getCustomerTaxNumber());
        $this->assertEquals(['DE'], $context->getStoreRegistrations());
        $this->assertSame($date, $context->getDate());
    }