From 187b3b55ccd67f91c3e1851a6e3ed3e10bc96699 Mon Sep 17 00:00:00 2001 From: php coder Date: Wed, 28 Feb 2024 18:45:35 +0300 Subject: [PATCH 01/19] Update composer.json --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 94cd327..4ba956a 100644 --- a/composer.json +++ b/composer.json @@ -24,11 +24,11 @@ ], "require": { "php": "^8.1", - "laravel/framework": "^10.10", + "laravel/framework": "^10.10|^11.0", "laravel/sanctum": "^3.2", "filament/filament": "^3.2", "spatie/laravel-package-tools": "^1.14.0", - "illuminate/contracts": "^10.0", + "illuminate/contracts": "^10.0|^11.0", "spatie/laravel-query-builder": "^5.3" }, "require-dev": { From 7594a8985ef863f37d8bbef4a3d22c3c3db802bd Mon Sep 17 00:00:00 2001 From: php coder Date: Wed, 28 Feb 2024 20:42:09 +0300 Subject: [PATCH 02/19] Update composer.json --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 4ba956a..1dfc3b9 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "require": { "php": "^8.1", "laravel/framework": "^10.10|^11.0", - "laravel/sanctum": "^3.2", + "laravel/sanctum": "^3.2|^4.0", "filament/filament": "^3.2", "spatie/laravel-package-tools": "^1.14.0", "illuminate/contracts": "^10.0|^11.0", @@ -33,7 +33,7 @@ }, "require-dev": { "nunomaduro/collision": "^7.9", - "orchestra/testbench": "^8.0", + "orchestra/testbench": "^8.0|^9.0", "pestphp/pest": "^2.0", "pestphp/pest-plugin-arch": "^2.0", "pestphp/pest-plugin-laravel": "^2.0", From e49cb96ed111bed80a20e50adf11c04f4005daf4 Mon Sep 17 00:00:00 2001 From: php coder Date: Sun, 17 Mar 2024 17:27:20 +0300 Subject: [PATCH 03/19] Update run-tests.yml --- .github/workflows/run-tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 7fefe35..76e5a24 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -14,12 +14,15 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] php: [8.2, 8.1] - laravel: [10.*] + laravel: [10.*, 11.*] stability: [prefer-lowest, prefer-stable] include: - laravel: 10.* testbench: 8.* carbon: ^2.63 + exclude: + - laravel: 11.* + php: 8.1 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} From d17081673ff7ec82585a70150d30b6fcbf110ba0 Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Mon, 18 Mar 2024 04:06:00 +0300 Subject: [PATCH 04/19] Update run-tests.yml --- .github/workflows/run-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 76e5a24..c23a230 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -20,6 +20,9 @@ jobs: - laravel: 10.* testbench: 8.* carbon: ^2.63 + - laravel: 11.* + testbench: 9.* + carbon: ^3.0 exclude: - laravel: 11.* php: 8.1 From c759c05ebb531cbfc4240864dc7d65984158abf8 Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Mon, 18 Mar 2024 04:08:51 +0300 Subject: [PATCH 05/19] Update composer.json --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 1dfc3b9..c61bf09 100644 --- a/composer.json +++ b/composer.json @@ -32,12 +32,12 @@ "spatie/laravel-query-builder": "^5.3" }, "require-dev": { - "nunomaduro/collision": "^7.9", + "nunomaduro/collision": "^7.9|^8.0", "orchestra/testbench": "^8.0|^9.0", "pestphp/pest": "^2.0", "pestphp/pest-plugin-arch": "^2.0", "pestphp/pest-plugin-laravel": "^2.0", - "phpunit/phpunit": "^10.0.17" + "phpunit/phpunit": "^10.0.17|^10.5" }, "autoload": { "psr-4": { From d542348f4087b36eb51699f4fdafd9219a25d608 Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Mon, 18 Mar 2024 04:36:57 +0300 Subject: [PATCH 06/19] pest migration fixes --- .phpunit.cache/test-results | 2 +- .../2014_10_12_000000_create_users_table.php | 32 +++++++++++++++++++ tests/Pest.php | 2 ++ tests/TestCase.php | 22 +++++++------ 4 files changed, 47 insertions(+), 11 deletions(-) create mode 100644 tests/Fixtures/Database/Migrations/2014_10_12_000000_create_users_table.php diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results index 9491d5a..2e5ea99 100644 --- a/.phpunit.cache/test-results +++ b/.phpunit.cache/test-results @@ -1 +1 @@ -{"version":"pest_2.32.2","defects":[],"times":{"P\\Tests\\ApiServiceTest::__pest_evaluable_it_can_return_a_list_of_products_with_selected_filters":0.088,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_can_return_a_list_of_products_with_selected_fields":0.083,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_throws_when_selecting_a_field_that_is_not_allowed":0.17,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_can_make_routes_for_a_product_resource":0.006,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_can_return_a_list_of_products_with_a_custom_transformer":0.081,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_throws_when_filtering_by_a_field_that_is_not_allowed":0.124,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_can_return_a_list_of_products_with_selected_sorts":0.086,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_throws_when_sorting_by_a_field_that_is_not_allowed":0.124,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_can_return_a_list_of_products_with_allowed_attributes":0.082,"P\\Tests\\ArchTest::__pest_evaluable_it_will_not_use_debugging_functions":0.134}} \ No newline at end of file +{"version":"pest_2.34.4","defects":[],"times":{"P\\Tests\\ApiServiceTest::__pest_evaluable_it_can_return_a_list_of_products_with_a_custom_transformer":0.078,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_can_return_a_list_of_products_with_allowed_attributes":0.078,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_can_return_a_list_of_products_with_selected_filters":0.079,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_throws_when_selecting_a_field_that_is_not_allowed":0.117,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_can_return_a_list_of_products_with_selected_fields":0.078,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_throws_when_sorting_by_a_field_that_is_not_allowed":0.133,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_throws_when_filtering_by_a_field_that_is_not_allowed":0.118,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_can_make_routes_for_a_product_resource":0.001,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_can_return_a_list_of_products_with_selected_sorts":0.079,"P\\Tests\\ArchTest::__pest_evaluable_it_will_not_use_debugging_functions":0.055}} \ No newline at end of file diff --git a/tests/Fixtures/Database/Migrations/2014_10_12_000000_create_users_table.php b/tests/Fixtures/Database/Migrations/2014_10_12_000000_create_users_table.php new file mode 100644 index 0000000..444fafb --- /dev/null +++ b/tests/Fixtures/Database/Migrations/2014_10_12_000000_create_users_table.php @@ -0,0 +1,32 @@ +id(); + $table->string('name'); + $table->string('email')->unique(); + $table->timestamp('email_verified_at')->nullable(); + $table->string('password'); + $table->rememberToken(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('users'); + } +}; diff --git a/tests/Pest.php b/tests/Pest.php index 23d55bc..b941487 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -1,5 +1,7 @@ in(__DIR__); +uses(RefreshDatabase::class); diff --git a/tests/TestCase.php b/tests/TestCase.php index ba065ce..e844409 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -18,20 +18,15 @@ use Livewire\LivewireServiceProvider; use Orchestra\Testbench\TestCase as Orchestra; use Rupadana\ApiService\ApiServiceServiceProvider; -use Rupadana\ApiService\Tests\Fixtures\ProductApiService\ProductApiService; use Rupadana\ApiService\Tests\Fixtures\Providers\AdminPanelProvider; use RyanChandler\BladeCaptureDirective\BladeCaptureDirectiveServiceProvider; use Spatie\QueryBuilder\QueryBuilderServiceProvider; +use Illuminate\Foundation\Application; class TestCase extends Orchestra { use RefreshDatabase; - protected function setUp(): void - { - parent::setUp(); - } - protected function getPackageProviders($app) { return [ @@ -69,12 +64,19 @@ public function getEnvironmentSetUp($app) }); } - protected function defineDatabaseMigrations() + protected function defineDatabaseMigrations(): void { - $this->loadLaravelMigrations(); - // Migrations for test fixtures - $this->loadMigrationsFrom(realpath(__DIR__.'/Fixtures/Database/Migrations')); + if (version_compare(Application::VERSION, '11', '<')) { + config()->set('database.default', 'testing'); + + (include __DIR__ . '/Fixtures/Database/Migrations/2014_10_12_000000_create_users_table.php')->up(); + (include __DIR__ . '/Fixtures/Database/Migrations/2019_12_14_000001_create_personal_access_tokens_table.php')->up(); + (include __DIR__ . '/Fixtures/Database/Migrations/01_create_products_table.php')->up(); + + } else { + $this->loadMigrationsFrom(realpath(__DIR__.'/Fixtures/Database/Migrations')); + } } protected function defineRoutes($router) From 5c5c60a0c7629a33f4a4cfee4f34a23c29cf74ba Mon Sep 17 00:00:00 2001 From: atmonshi Date: Mon, 18 Mar 2024 01:37:21 +0000 Subject: [PATCH 07/19] Fix styling --- tests/Pest.php | 2 +- tests/TestCase.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/Pest.php b/tests/Pest.php index b941487..20f8288 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -1,7 +1,7 @@ in(__DIR__); uses(RefreshDatabase::class); diff --git a/tests/TestCase.php b/tests/TestCase.php index e844409..1c5752a 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -13,6 +13,7 @@ use Filament\Tables\TablesServiceProvider; use Filament\Widgets\WidgetsServiceProvider; use Illuminate\Contracts\Config\Repository; +use Illuminate\Foundation\Application; use Illuminate\Foundation\Testing\RefreshDatabase; use Laravel\Sanctum\SanctumServiceProvider; use Livewire\LivewireServiceProvider; @@ -21,7 +22,6 @@ use Rupadana\ApiService\Tests\Fixtures\Providers\AdminPanelProvider; use RyanChandler\BladeCaptureDirective\BladeCaptureDirectiveServiceProvider; use Spatie\QueryBuilder\QueryBuilderServiceProvider; -use Illuminate\Foundation\Application; class TestCase extends Orchestra { @@ -70,9 +70,9 @@ protected function defineDatabaseMigrations(): void if (version_compare(Application::VERSION, '11', '<')) { config()->set('database.default', 'testing'); - (include __DIR__ . '/Fixtures/Database/Migrations/2014_10_12_000000_create_users_table.php')->up(); - (include __DIR__ . '/Fixtures/Database/Migrations/2019_12_14_000001_create_personal_access_tokens_table.php')->up(); - (include __DIR__ . '/Fixtures/Database/Migrations/01_create_products_table.php')->up(); + (include __DIR__.'/Fixtures/Database/Migrations/2014_10_12_000000_create_users_table.php')->up(); + (include __DIR__.'/Fixtures/Database/Migrations/2019_12_14_000001_create_personal_access_tokens_table.php')->up(); + (include __DIR__.'/Fixtures/Database/Migrations/01_create_products_table.php')->up(); } else { $this->loadMigrationsFrom(realpath(__DIR__.'/Fixtures/Database/Migrations')); From 0c1cf9f08386740cdbd37d232859de7a3de3b124 Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Mon, 18 Mar 2024 04:39:25 +0300 Subject: [PATCH 08/19] wip --- .gitignore | 1 + tests/TestCase.php | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 8271e65..f0e09c5 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ phpunit.xml phpstan.neon testbench.yaml vendor +.phpunit.cache/test-results diff --git a/tests/TestCase.php b/tests/TestCase.php index e844409..afb9d34 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -67,15 +67,12 @@ public function getEnvironmentSetUp($app) protected function defineDatabaseMigrations(): void { // Migrations for test fixtures - if (version_compare(Application::VERSION, '11', '<')) { - config()->set('database.default', 'testing'); - + if (version_compare(Application::VERSION, '11', '>=')) { + $this->loadMigrationsFrom(realpath(__DIR__.'/Fixtures/Database/Migrations')); + } else { (include __DIR__ . '/Fixtures/Database/Migrations/2014_10_12_000000_create_users_table.php')->up(); (include __DIR__ . '/Fixtures/Database/Migrations/2019_12_14_000001_create_personal_access_tokens_table.php')->up(); (include __DIR__ . '/Fixtures/Database/Migrations/01_create_products_table.php')->up(); - - } else { - $this->loadMigrationsFrom(realpath(__DIR__.'/Fixtures/Database/Migrations')); } } From 8c1ff60b37190b62c32dc8bc1aa32bc787595c83 Mon Sep 17 00:00:00 2001 From: atmonshi Date: Mon, 18 Mar 2024 01:41:03 +0000 Subject: [PATCH 09/19] Fix styling --- tests/TestCase.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index 18d3b35..ba52b40 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -70,9 +70,9 @@ protected function defineDatabaseMigrations(): void if (version_compare(Application::VERSION, '11', '>=')) { $this->loadMigrationsFrom(realpath(__DIR__.'/Fixtures/Database/Migrations')); } else { - (include __DIR__ . '/Fixtures/Database/Migrations/2014_10_12_000000_create_users_table.php')->up(); - (include __DIR__ . '/Fixtures/Database/Migrations/2019_12_14_000001_create_personal_access_tokens_table.php')->up(); - (include __DIR__ . '/Fixtures/Database/Migrations/01_create_products_table.php')->up(); + (include __DIR__.'/Fixtures/Database/Migrations/2014_10_12_000000_create_users_table.php')->up(); + (include __DIR__.'/Fixtures/Database/Migrations/2019_12_14_000001_create_personal_access_tokens_table.php')->up(); + (include __DIR__.'/Fixtures/Database/Migrations/01_create_products_table.php')->up(); } } From 2894aa2c96992da107e6c3dd52b0c6c45f153a24 Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Mon, 18 Mar 2024 04:45:47 +0300 Subject: [PATCH 10/19] update datebase --- .phpunit.cache/test-results | 1 - tests/TestCase.php | 9 +-------- 2 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 .phpunit.cache/test-results diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results deleted file mode 100644 index 2e5ea99..0000000 --- a/.phpunit.cache/test-results +++ /dev/null @@ -1 +0,0 @@ -{"version":"pest_2.34.4","defects":[],"times":{"P\\Tests\\ApiServiceTest::__pest_evaluable_it_can_return_a_list_of_products_with_a_custom_transformer":0.078,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_can_return_a_list_of_products_with_allowed_attributes":0.078,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_can_return_a_list_of_products_with_selected_filters":0.079,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_throws_when_selecting_a_field_that_is_not_allowed":0.117,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_can_return_a_list_of_products_with_selected_fields":0.078,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_throws_when_sorting_by_a_field_that_is_not_allowed":0.133,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_throws_when_filtering_by_a_field_that_is_not_allowed":0.118,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_can_make_routes_for_a_product_resource":0.001,"P\\Tests\\ApiServiceTest::__pest_evaluable_it_can_return_a_list_of_products_with_selected_sorts":0.079,"P\\Tests\\ArchTest::__pest_evaluable_it_will_not_use_debugging_functions":0.055}} \ No newline at end of file diff --git a/tests/TestCase.php b/tests/TestCase.php index ba52b40..9a9bdc7 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -66,14 +66,7 @@ public function getEnvironmentSetUp($app) protected function defineDatabaseMigrations(): void { - // Migrations for test fixtures - if (version_compare(Application::VERSION, '11', '>=')) { - $this->loadMigrationsFrom(realpath(__DIR__.'/Fixtures/Database/Migrations')); - } else { - (include __DIR__.'/Fixtures/Database/Migrations/2014_10_12_000000_create_users_table.php')->up(); - (include __DIR__.'/Fixtures/Database/Migrations/2019_12_14_000001_create_personal_access_tokens_table.php')->up(); - (include __DIR__.'/Fixtures/Database/Migrations/01_create_products_table.php')->up(); - } + $this->loadMigrationsFrom(realpath(__DIR__.'/Fixtures/Database/Migrations')); } protected function defineRoutes($router) From 812027e789191cdd38077927be1c280573d34ffa Mon Sep 17 00:00:00 2001 From: atmonshi Date: Mon, 18 Mar 2024 01:46:07 +0000 Subject: [PATCH 11/19] Fix styling --- tests/TestCase.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index 9a9bdc7..d149011 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -13,7 +13,6 @@ use Filament\Tables\TablesServiceProvider; use Filament\Widgets\WidgetsServiceProvider; use Illuminate\Contracts\Config\Repository; -use Illuminate\Foundation\Application; use Illuminate\Foundation\Testing\RefreshDatabase; use Laravel\Sanctum\SanctumServiceProvider; use Livewire\LivewireServiceProvider; From b5395ebc267c4a8e312f12ad9e0ab5713a9d0bdf Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Mon, 18 Mar 2024 04:46:47 +0300 Subject: [PATCH 12/19] fix --- .gitignore | 2 +- tests/TestCase.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f0e09c5..943c30f 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,4 @@ phpunit.xml phpstan.neon testbench.yaml vendor -.phpunit.cache/test-results +.phpunit.cache/test-results \ No newline at end of file diff --git a/tests/TestCase.php b/tests/TestCase.php index d149011..48d3033 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -70,6 +70,7 @@ protected function defineDatabaseMigrations(): void protected function defineRoutes($router) { + // // $router->group(['prefix' => 'api'], function () { // ProductApiService::routes(); // }); From b720661d3d510b7a9ed81260250ca15fa034bf0f Mon Sep 17 00:00:00 2001 From: atmonshi Date: Mon, 18 Mar 2024 01:47:05 +0000 Subject: [PATCH 13/19] Fix styling --- tests/TestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index 48d3033..05e0988 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -70,7 +70,7 @@ protected function defineDatabaseMigrations(): void protected function defineRoutes($router) { - // + // // $router->group(['prefix' => 'api'], function () { // ProductApiService::routes(); // }); From b7a80a25c00fce4f1ef89a7bae97aa66ba2d8087 Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Mon, 18 Mar 2024 04:47:30 +0300 Subject: [PATCH 14/19] Update TestCase.php --- tests/TestCase.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index 05e0988..d149011 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -70,7 +70,6 @@ protected function defineDatabaseMigrations(): void protected function defineRoutes($router) { - // // $router->group(['prefix' => 'api'], function () { // ProductApiService::routes(); // }); From c024ba67cd3a3b6bd172fd7143d34e1395c9f769 Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Mon, 18 Mar 2024 04:53:35 +0300 Subject: [PATCH 15/19] Update Pest.php --- tests/Pest.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/Pest.php b/tests/Pest.php index 20f8288..23d55bc 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -1,7 +1,5 @@ in(__DIR__); -uses(RefreshDatabase::class); From c1a66c1c1db75abc81f8a9559750427e83182d4e Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Mon, 18 Mar 2024 05:15:20 +0300 Subject: [PATCH 16/19] Update TestCase.php --- tests/WithPanelPrefix/TestCase.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tests/WithPanelPrefix/TestCase.php b/tests/WithPanelPrefix/TestCase.php index dc0fe81..f3a128d 100644 --- a/tests/WithPanelPrefix/TestCase.php +++ b/tests/WithPanelPrefix/TestCase.php @@ -67,11 +67,4 @@ protected function defineDatabaseMigrations(): void { $this->loadMigrationsFrom(realpath(__DIR__.'/Fixtures/Database/Migrations')); } - - protected function defineRoutes($router) - { - // $router->group(['prefix' => 'api'], function () { - // ProductApiService::routes(); - // }); - } } From 11c6d1c0fdd4300d0008a20424c1d7edf0d5fe4c Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Mon, 18 Mar 2024 15:03:19 +0300 Subject: [PATCH 17/19] Update TestCase.php --- tests/WithPanelPrefix/TestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/WithPanelPrefix/TestCase.php b/tests/WithPanelPrefix/TestCase.php index f3a128d..adf51eb 100644 --- a/tests/WithPanelPrefix/TestCase.php +++ b/tests/WithPanelPrefix/TestCase.php @@ -65,6 +65,6 @@ public function getEnvironmentSetUp($app) protected function defineDatabaseMigrations(): void { - $this->loadMigrationsFrom(realpath(__DIR__.'/Fixtures/Database/Migrations')); + $this->loadMigrationsFrom(realpath(__DIR__.'/../Fixtures/Database/Migrations')); } } From a6e33246b0004e24b16fdc4459cf532bd6300df4 Mon Sep 17 00:00:00 2001 From: Rupadana <34137674+rupadana@users.noreply.github.com> Date: Mon, 18 Mar 2024 20:06:48 +0800 Subject: [PATCH 18/19] Delete tests/Fixtures/Database/Migrations/2014_10_12_000000_create_users_table.php --- .../2014_10_12_000000_create_users_table.php | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 tests/Fixtures/Database/Migrations/2014_10_12_000000_create_users_table.php diff --git a/tests/Fixtures/Database/Migrations/2014_10_12_000000_create_users_table.php b/tests/Fixtures/Database/Migrations/2014_10_12_000000_create_users_table.php deleted file mode 100644 index 444fafb..0000000 --- a/tests/Fixtures/Database/Migrations/2014_10_12_000000_create_users_table.php +++ /dev/null @@ -1,32 +0,0 @@ -id(); - $table->string('name'); - $table->string('email')->unique(); - $table->timestamp('email_verified_at')->nullable(); - $table->string('password'); - $table->rememberToken(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('users'); - } -}; From d457728bfdbb02f8c5dde279e3d9b25c937e6b57 Mon Sep 17 00:00:00 2001 From: I Wayan Rupadana Date: Mon, 18 Mar 2024 20:28:29 +0800 Subject: [PATCH 19/19] Update --- .../2014_10_12_000000_create_users_table.php | 35 +++++++++++++++++++ tests/WithPanelPrefix/TestCase.php | 2 +- tests/WithoutPanelPrefix/TestCase.php | 3 -- 3 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 tests/Fixtures/Database/Migrations/2014_10_12_000000_create_users_table.php diff --git a/tests/Fixtures/Database/Migrations/2014_10_12_000000_create_users_table.php b/tests/Fixtures/Database/Migrations/2014_10_12_000000_create_users_table.php new file mode 100644 index 0000000..beb06a3 --- /dev/null +++ b/tests/Fixtures/Database/Migrations/2014_10_12_000000_create_users_table.php @@ -0,0 +1,35 @@ +id(); + $table->string('name'); + $table->string('email')->unique(); + $table->timestamp('email_verified_at')->nullable(); + $table->string('password'); + $table->rememberToken(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('users'); + } +}; diff --git a/tests/WithPanelPrefix/TestCase.php b/tests/WithPanelPrefix/TestCase.php index adf51eb..d360518 100644 --- a/tests/WithPanelPrefix/TestCase.php +++ b/tests/WithPanelPrefix/TestCase.php @@ -65,6 +65,6 @@ public function getEnvironmentSetUp($app) protected function defineDatabaseMigrations(): void { - $this->loadMigrationsFrom(realpath(__DIR__.'/../Fixtures/Database/Migrations')); + $this->loadMigrationsFrom(realpath(__DIR__ . '/../Fixtures/Database/Migrations')); } } diff --git a/tests/WithoutPanelPrefix/TestCase.php b/tests/WithoutPanelPrefix/TestCase.php index 972ee3d..393627a 100644 --- a/tests/WithoutPanelPrefix/TestCase.php +++ b/tests/WithoutPanelPrefix/TestCase.php @@ -66,9 +66,6 @@ public function getEnvironmentSetUp($app) protected function defineDatabaseMigrations() { - $this->loadLaravelMigrations(); - - // Migrations for test fixtures $this->loadMigrationsFrom(realpath(__DIR__ . '/../Fixtures/Database/Migrations')); } }