public function UPSShipmentTest::testShipTo in Commerce UPS 8.3
Test ship to address.
@covers ::setShipTo
File
- tests/
src/ Unit/ UPSShipmentTest.php, line 52
Class
- UPSShipmentTest
- Class UPSShipmentTest.
Namespace
Drupal\Tests\commerce_ups\UnitCode
public function testShipTo() {
$api_shipment = $this->upsShipment
->getShipment($this
->mockShipment(), $this
->mockShippingMethod());
$ship_to = $api_shipment
->getShipTo()
->getAddress();
$this
->assertEquals('1025 Brevard Rd', $ship_to
->getAddressLine1());
$this
->assertEquals('Asheville', $ship_to
->getCity());
$this
->assertEquals('NC', $ship_to
->getStateProvinceCode());
$this
->assertEquals('28806', $ship_to
->getPostalCode());
$this
->assertEquals('US', $ship_to
->getCountryCode());
}