Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 /** @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));
 }
Exemplo n.º 3
0
 /** @test */
 function weight_can_convert_to_pounds()
 {
     $weight = Weight::fromPounds(5);
     $this->assertEquals(5, $weight->pounds());
 }