-
-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathShipmentTest.php
More file actions
32 lines (26 loc) · 901 Bytes
/
ShipmentTest.php
File metadata and controls
32 lines (26 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
namespace Mvdnbrk\DhlParcel\Tests\Unit\Resources;
use Illuminate\Support\Collection;
use Mvdnbrk\DhlParcel\Resources\Shipment;
use Mvdnbrk\DhlParcel\Tests\TestCase;
class ShipmentTest extends TestCase
{
/** @test */
public function it_has_a_pieces_collection()
{
$shipment = new Shipment;
$this->assertInstanceOf(Collection::class, $shipment->pieces);
}
/** @test */
public function creating_a_new_shipment_resource()
{
$shipment = new Shipment([
'id' => '123456',
'barcode' => 'JVGL11112222333344445555',
'label_id' => '12345678-aaaa-bbbb-cccc-123456789123',
]);
$this->assertEquals('123456', $shipment->id);
$this->assertEquals('JVGL11112222333344445555', $shipment->barcode);
$this->assertEquals('12345678-aaaa-bbbb-cccc-123456789123', $shipment->label_id);
}
}