mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-08-21 13:34:16 +00:00
112 lines
2.5 KiB
PHP
112 lines
2.5 KiB
PHP
<?php
|
|
|
|
namespace Tests\Unit;
|
|
|
|
use Tests\TestCase;
|
|
use Illuminate\Foundation\Testing\WithFaker;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use App\Shipment;
|
|
use App\Shipmentitem;
|
|
use App\Customexam;
|
|
use Artisan;
|
|
|
|
class ShipmentArrangementTest extends TestCase
|
|
{
|
|
public function setUp()
|
|
{
|
|
parent::setUp();
|
|
Artisan::call('db:seed');
|
|
$this->user = factory(User::class)->create();
|
|
$this->company = $this->user->each(function ($u) {
|
|
factory(Company::class)->create([
|
|
'user_id' => $u->id,
|
|
]);
|
|
});
|
|
|
|
}
|
|
|
|
// public function testPOST()
|
|
// {
|
|
// $response = $this->json('POST', '/api/shipment',
|
|
|
|
// [
|
|
|
|
// 'loading_date'=> '2018-06-05',
|
|
// 'shipment_no'=> '123213',
|
|
// 'departure_port'=> 'TEST',
|
|
// 'container_no'=> '12312',
|
|
// 'type_of_container'=> 'TEST',
|
|
// 'last_etd'=> '2018-06-05',
|
|
// 'last_eta'=> '2018-06-05',
|
|
// 'driver_name'=> 'TEST',
|
|
// 'driver_contact_no'=> '1213',
|
|
// 'trailer_no'=> '12324',
|
|
// 'driver_ic_no'=> '12345',
|
|
// 'loading_address'=> 'TEST',
|
|
// 'loading_city'=> 'TEST',
|
|
// 'loading_state'=> 'TEST',
|
|
// 'contact_no'=> '12345',
|
|
// 'country'=> 'TEST',
|
|
// 'contact_person'=> 'TEST',
|
|
// 'remark'=> 'TEST',
|
|
// 'so_id'=> '1',
|
|
// 'com_id'=> '1',
|
|
|
|
// ]);
|
|
|
|
// $response->assertStatus(201);
|
|
|
|
// }
|
|
|
|
|
|
// public function testPUT()
|
|
// {
|
|
// $response = $this->json('PUT', '/api/shipment/1',
|
|
|
|
// [
|
|
|
|
// 'loading_date'=> '2018-06-05',
|
|
// 'shipment_no'=> '123213',
|
|
// 'departure_port'=> 'TEST',
|
|
// 'container_no'=> '12312',
|
|
// 'type_of_container'=> 'TEST',
|
|
// 'last_etd'=> '2018-06-05',
|
|
// 'last_eta'=> '2018-06-05',
|
|
// 'driver_name'=> 'TEST',
|
|
// 'driver_contact_no'=> '1213',
|
|
// 'trailer_no'=> '12324',
|
|
// 'driver_ic_no'=> '12345',
|
|
// 'loading_address'=> 'TEST',
|
|
// 'loading_city'=> 'TEST',
|
|
// 'loading_state'=> 'TEST',
|
|
// 'contact_no'=> '12345',
|
|
// 'country'=> 'TEST',
|
|
// 'contact_person'=> 'TEST',
|
|
// 'remark'=> 'TEST',
|
|
// 'so_id'=> '1',
|
|
// 'com_id'=> '1',
|
|
|
|
// ]);
|
|
|
|
// $response->assertStatus(201);
|
|
|
|
// }
|
|
|
|
// public function testPUTcustom()
|
|
// {
|
|
// $response = $this->json('PUT', '/api/custom/1',
|
|
|
|
// [
|
|
// 'so_id' => '1',
|
|
// 'custom_date' => '2018-06-05',
|
|
// 'new_etd' => '2018-06-05',
|
|
// 'new_eta' => '2018-06-05',
|
|
// 'release_date' => '2018-06-05',
|
|
|
|
// ]);
|
|
|
|
// $response->assertStatus(201);
|
|
|
|
// }
|
|
}
|