function setUp() { $this->origin = new Location('BANDUNG', 'QkRPMTAwMDA='); $this->destination = new Location('DEPOK', 'RFBLMTAwMDA='); $this->weight = Weight::fromKilograms(10); $this->package = new Package($this->origin, $this->destination, $this->weight); }
/** @test */ function jne_can_retrieve_delivery_options() { $jne = new Jne(); $origin = new Location('BANDUNG', 'QkRPMTAwMDA='); $destination = new Location('DEPOK', 'RFBLMTAwMDA='); $weight = Weight::fromKilograms(10); $package = new Package($origin, $destination, $weight); $this->assertInstanceOf(DeliveryOptionCollectionInterface::class, $jne->deliveryOptions($package)); }
/** @test */ function weight_can_convert_to_pounds() { $weight = Weight::fromPounds(5); $this->assertEquals(5, $weight->pounds()); }