mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-19 04:24:08 +00:00
84 lines
2.2 KiB
PHP
84 lines
2.2 KiB
PHP
<?php
|
|
|
|
namespace Tests\Unit\OrderTest;
|
|
|
|
use Tests\TestCase;
|
|
use Illuminate\Foundation\Testing\WithFaker;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
|
|
|
|
|
class OrderTest extends TestCase
|
|
{
|
|
/**
|
|
* A basic test example.
|
|
*
|
|
* @return void
|
|
*/
|
|
// public function testBasicTest()
|
|
// {
|
|
// $this->assertTrue(true);
|
|
// $response = $this->json('POST', '/api/booking', ['book_id' => '10']);
|
|
|
|
// $response
|
|
// ->assertStatus(201)
|
|
// ->assertJson([
|
|
// //'ff_id' => 'inserted',
|
|
// ]);
|
|
// }
|
|
|
|
public function testGet()
|
|
{
|
|
$response = $this->get('/api/booking');
|
|
|
|
$response->assertStatus(200);
|
|
}
|
|
|
|
// public function testPost()
|
|
// {
|
|
// $response = $this->json('POST', '/api/booking/2', [
|
|
|
|
// 'account_name' => 'kita',
|
|
// 'account_num' => '1234',
|
|
// 'bank_name' => 'ferdas',
|
|
// 'bank_branch' => 'dersa',
|
|
// 'company_name' => 'desaq',
|
|
// 'company_address' => 'qada',
|
|
// 'bank_address' => 'daqa',
|
|
// 'swift_code' => '3eds2',
|
|
// 'cnap' => 'redah'
|
|
|
|
// ]);
|
|
|
|
// $response
|
|
// ->assertStatus(201);
|
|
// }
|
|
|
|
// public function testPut()
|
|
// {
|
|
// $response = $this->json('PUT', '/api/booking/1', [
|
|
|
|
// 'account_name' => 'kaokndfoanf',
|
|
// 'account_num' => '1234',
|
|
// 'bank_name' => 'ferdas',
|
|
// 'bank_branch' => 'dersa',
|
|
// 'company_name' => 'desaq',
|
|
// 'company_address' => 'qada',
|
|
// 'bank_address' => 'daqa',
|
|
// 'swift_code' => '3eds2',
|
|
// 'cnap' => 'redah'
|
|
|
|
// ]);
|
|
|
|
// $response
|
|
// ->assertStatus(200);
|
|
// }
|
|
|
|
public function testDelete()
|
|
{
|
|
$response = $this->json('DELETE', '/api/booking/2');
|
|
|
|
$response->assertStatus(204);
|
|
}
|
|
}
|