mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-19 04:24:08 +00:00
changed ordertest to bookingtest
updated databaseseeder to use class updated booking seeder
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Carbon\Carbon;
|
||||
use App\User;
|
||||
use App\Rate;
|
||||
|
||||
class BookTableSeeder extends Seeder
|
||||
{
|
||||
@@ -11,9 +13,11 @@ class BookTableSeeder extends Seeder
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
{
|
||||
$user = User::where("email", "user@example.com")->first();
|
||||
$rate = Rate::all()->last();
|
||||
|
||||
DB::table('bookings')->insert([
|
||||
// 'id' => '1',
|
||||
'account_name' => 'milah',
|
||||
'account_num' => '99898',
|
||||
'bank_name' => 'maybank',
|
||||
@@ -25,8 +29,8 @@ class BookTableSeeder extends Seeder
|
||||
'cnap' => '123asd',
|
||||
'term' => 'x1',
|
||||
'amount' => 1.2,
|
||||
'rate_id' => '1',
|
||||
'user_id' => '3',
|
||||
'rate_id' => $rate->id,
|
||||
'user_id' => $user->id,
|
||||
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
|
||||
'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),
|
||||
]);
|
||||
|
||||
@@ -13,9 +13,7 @@ class DatabaseSeeder extends Seeder
|
||||
{
|
||||
$this->call(UsersTableSeeder::class);
|
||||
$this->call(RolesAndPermissionsSeeder::class);
|
||||
// $this->call(RateTableSeeder::class);
|
||||
$this->call('Database\Seeds\RateTableSeeder');
|
||||
$this->call('Database\Seeds\BookTableSeeder');
|
||||
|
||||
$this->call(RateTableSeeder::class);
|
||||
$this->call(BookTableSeeder::class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\OrderTest;
|
||||
namespace Tests\Unit\BookingTest;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
@@ -8,7 +8,7 @@ use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
|
||||
|
||||
class OrderTest extends TestCase
|
||||
class BookingTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* A basic test example.
|
||||
@@ -52,7 +52,7 @@ class OrderTest extends TestCase
|
||||
'user_id' => '1',
|
||||
|
||||
]);
|
||||
// dd($response->getContent());
|
||||
dd($response->getContent());
|
||||
$response
|
||||
->assertStatus(201);
|
||||
|
||||
+1
-1
@@ -3731,7 +3731,7 @@ return array(
|
||||
'Tests\\Feature\\SettingsTest' => $baseDir . '/tests/Feature/SettingsTest.php',
|
||||
'Tests\\TestCase' => $baseDir . '/tests/TestCase.php',
|
||||
'Tests\\Unit\\ExampleTest' => $baseDir . '/tests/Unit/ExampleTest.php',
|
||||
'Tests\\Unit\\OrderTest\\OrderTest' => $baseDir . '/tests/Unit/OrderTest.php',
|
||||
'Tests\\Unit\\OrderTest\\OrderTest' => $baseDir . '/tests/Unit/BookingTest.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
+6
-6
@@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInitcf93d959a701f2cce72413258326eb20
|
||||
class ComposerStaticInit51a2977d18ddf089cd82402f3476f1a0
|
||||
{
|
||||
public static $files = array (
|
||||
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
||||
@@ -4130,7 +4130,7 @@ class ComposerStaticInitcf93d959a701f2cce72413258326eb20
|
||||
'Tests\\Feature\\SettingsTest' => __DIR__ . '/../..' . '/tests/Feature/SettingsTest.php',
|
||||
'Tests\\TestCase' => __DIR__ . '/../..' . '/tests/TestCase.php',
|
||||
'Tests\\Unit\\ExampleTest' => __DIR__ . '/../..' . '/tests/Unit/ExampleTest.php',
|
||||
'Tests\\Unit\\OrderTest\\OrderTest' => __DIR__ . '/../..' . '/tests/Unit/OrderTest.php',
|
||||
'Tests\\Unit\\OrderTest\\OrderTest' => __DIR__ . '/../..' . '/tests/Unit/BookingTest.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',
|
||||
@@ -4320,10 +4320,10 @@ class ComposerStaticInitcf93d959a701f2cce72413258326eb20
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitcf93d959a701f2cce72413258326eb20::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitcf93d959a701f2cce72413258326eb20::$prefixDirsPsr4;
|
||||
$loader->prefixesPsr0 = ComposerStaticInitcf93d959a701f2cce72413258326eb20::$prefixesPsr0;
|
||||
$loader->classMap = ComposerStaticInitcf93d959a701f2cce72413258326eb20::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit51a2977d18ddf089cd82402f3476f1a0::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit51a2977d18ddf089cd82402f3476f1a0::$prefixDirsPsr4;
|
||||
$loader->prefixesPsr0 = ComposerStaticInit51a2977d18ddf089cd82402f3476f1a0::$prefixesPsr0;
|
||||
$loader->classMap = ComposerStaticInit51a2977d18ddf089cd82402f3476f1a0::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user