CommerceGuys\Addressing\Tests\AddressTest::testConstructor PHP Method

testConstructor() public method

public testConstructor ( )
    public function testConstructor()
    {
        $address = new Address('US', 'CA', 'Mountain View', 'MV', '94043', '94044', '1600 Amphitheatre Parkway', 'Google Bldg 41', 'Google Inc.', 'John', '', 'Smith', 'en');
        $this->assertEquals('US', $address->getCountryCode());
        $this->assertEquals('CA', $address->getAdministrativeArea());
        $this->assertEquals('Mountain View', $address->getLocality());
        $this->assertEquals('MV', $address->getDependentLocality());
        $this->assertEquals('94043', $address->getPostalCode());
        $this->assertEquals('94044', $address->getSortingCode());
        $this->assertEquals('1600 Amphitheatre Parkway', $address->getAddressLine1());
        $this->assertEquals('Google Bldg 41', $address->getAddressLine2());
        $this->assertEquals('Google Inc.', $address->getOrganization());
        $this->assertEquals('John', $address->getGivenName());
        $this->assertEquals('Smith', $address->getFamilyName());
        $this->assertEquals('en', $address->getLocale());
    }