mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
edit the unit test
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class BookTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
+33
-33
@@ -34,49 +34,49 @@ class OrderTest extends TestCase
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
// public function testPost()
|
||||
// {
|
||||
// $response = $this->json('POST', '/api/booking/2', [
|
||||
public function testPost()
|
||||
{
|
||||
$response = $this->json('POST', '/api/booking/1', [
|
||||
|
||||
// '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'
|
||||
'account_name' => 'kijd',
|
||||
'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);
|
||||
// }
|
||||
$response
|
||||
->assertStatus(201);
|
||||
}
|
||||
|
||||
// public function testPut()
|
||||
// {
|
||||
// $response = $this->json('PUT', '/api/booking/1', [
|
||||
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'
|
||||
'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);
|
||||
// }
|
||||
$response
|
||||
->assertStatus(200);
|
||||
}
|
||||
|
||||
public function testDelete()
|
||||
{
|
||||
$response = $this->json('DELETE', '/api/booking/2');
|
||||
$response = $this->json('DELETE', '/api/booking/1');
|
||||
|
||||
$response->assertStatus(204);
|
||||
}
|
||||
|
||||
+2
-2
@@ -28,6 +28,7 @@ return array(
|
||||
'App\\Providers\\EventServiceProvider' => $baseDir . '/app/Providers/EventServiceProvider.php',
|
||||
'App\\Providers\\RouteServiceProvider' => $baseDir . '/app/Providers/RouteServiceProvider.php',
|
||||
'App\\User' => $baseDir . '/app/User.php',
|
||||
'BookTableSeeder' => $baseDir . '/database/seeds/BookTableSeeder.php',
|
||||
'Carbon\\Carbon' => $vendorDir . '/nesbot/carbon/src/Carbon/Carbon.php',
|
||||
'Carbon\\CarbonInterval' => $vendorDir . '/nesbot/carbon/src/Carbon/CarbonInterval.php',
|
||||
'Carbon\\Exceptions\\InvalidDateException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php',
|
||||
@@ -3293,9 +3294,8 @@ return array(
|
||||
'Symfony\\Polyfill\\Util\\TestListener' => $vendorDir . '/symfony/polyfill-util/TestListener.php',
|
||||
'Symfony\\Polyfill\\Util\\TestListenerTrait' => $vendorDir . '/symfony/polyfill-util/TestListenerTrait.php',
|
||||
'Tests\\CreatesApplication' => $baseDir . '/tests/CreatesApplication.php',
|
||||
'Tests\\Feature\\ExampleTest' => $baseDir . '/tests/Feature/ExampleTest.php',
|
||||
'Tests\\TestCase' => $baseDir . '/tests/TestCase.php',
|
||||
'Tests\\Unit\\ExampleTest' => $baseDir . '/tests/Unit/ExampleTest.php',
|
||||
'Tests\\Unit\\OrderTest\\OrderTest' => $baseDir . '/tests/Unit/OrderTest.php',
|
||||
'Text_Template' => $vendorDir . '/phpunit/php-text-template/src/Template.php',
|
||||
'TheSeer\\Tokenizer\\Exception' => $vendorDir . '/theseer/tokenizer/src/Exception.php',
|
||||
'TheSeer\\Tokenizer\\NamespaceUri' => $vendorDir . '/theseer/tokenizer/src/NamespaceUri.php',
|
||||
|
||||
Vendored
+2
-2
@@ -362,6 +362,7 @@ class ComposerStaticInitcf93d959a701f2cce72413258326eb20
|
||||
'App\\Providers\\EventServiceProvider' => __DIR__ . '/../..' . '/app/Providers/EventServiceProvider.php',
|
||||
'App\\Providers\\RouteServiceProvider' => __DIR__ . '/../..' . '/app/Providers/RouteServiceProvider.php',
|
||||
'App\\User' => __DIR__ . '/../..' . '/app/User.php',
|
||||
'BookTableSeeder' => __DIR__ . '/../..' . '/database/seeds/BookTableSeeder.php',
|
||||
'Carbon\\Carbon' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Carbon.php',
|
||||
'Carbon\\CarbonInterval' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/CarbonInterval.php',
|
||||
'Carbon\\Exceptions\\InvalidDateException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php',
|
||||
@@ -3627,9 +3628,8 @@ class ComposerStaticInitcf93d959a701f2cce72413258326eb20
|
||||
'Symfony\\Polyfill\\Util\\TestListener' => __DIR__ . '/..' . '/symfony/polyfill-util/TestListener.php',
|
||||
'Symfony\\Polyfill\\Util\\TestListenerTrait' => __DIR__ . '/..' . '/symfony/polyfill-util/TestListenerTrait.php',
|
||||
'Tests\\CreatesApplication' => __DIR__ . '/../..' . '/tests/CreatesApplication.php',
|
||||
'Tests\\Feature\\ExampleTest' => __DIR__ . '/../..' . '/tests/Feature/ExampleTest.php',
|
||||
'Tests\\TestCase' => __DIR__ . '/../..' . '/tests/TestCase.php',
|
||||
'Tests\\Unit\\ExampleTest' => __DIR__ . '/../..' . '/tests/Unit/ExampleTest.php',
|
||||
'Tests\\Unit\\OrderTest\\OrderTest' => __DIR__ . '/../..' . '/tests/Unit/OrderTest.php',
|
||||
'Text_Template' => __DIR__ . '/..' . '/phpunit/php-text-template/src/Template.php',
|
||||
'TheSeer\\Tokenizer\\Exception' => __DIR__ . '/..' . '/theseer/tokenizer/src/Exception.php',
|
||||
'TheSeer\\Tokenizer\\NamespaceUri' => __DIR__ . '/..' . '/theseer/tokenizer/src/NamespaceUri.php',
|
||||
|
||||
Reference in New Issue
Block a user