From 749b84cc2c8a5f590dccc96027c772951edc0ee9 Mon Sep 17 00:00:00 2001 From: Dan Harrin Date: Tue, 3 Jun 2025 15:15:17 +0100 Subject: [PATCH] fix tests --- .../Panels/Commands/Legacy/LegacyMakePageCommandTest.php | 8 ++++---- .../Legacy/LegacyMakeRelationManagerCommandTest.php | 2 +- .../Commands/Legacy/LegacyMakeResourceCommandTest.php | 4 ++-- tests/src/Panels/Commands/MakePageCommandTest.php | 8 ++++---- .../Panels/Commands/MakeRelationManagerCommandTest.php | 2 +- tests/src/Panels/Commands/MakeResourceCommandTest.php | 6 +++--- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/src/Panels/Commands/Legacy/LegacyMakePageCommandTest.php b/tests/src/Panels/Commands/Legacy/LegacyMakePageCommandTest.php index 08c279512c..7a0b069bb6 100644 --- a/tests/src/Panels/Commands/Legacy/LegacyMakePageCommandTest.php +++ b/tests/src/Panels/Commands/Legacy/LegacyMakePageCommandTest.php @@ -303,7 +303,7 @@ $runGenerateManageRelatedRecordsPageCommand = function (TestCase $testCase): Pen '--no-interaction' => true, ]) ->expectsQuestion('Should the configuration be generated from the current database columns?', false) - ->expectsQuestion('Does the model use soft deletes?', false); + ->expectsQuestion('Does the model use soft-deletes?', false); $testCase->artisan('make:filament-resource', [ 'model' => 'User', @@ -312,7 +312,7 @@ $runGenerateManageRelatedRecordsPageCommand = function (TestCase $testCase): Pen ]) ->expectsQuestion('Would you like to generate a read-only view page for the resource?', false) ->expectsQuestion('Should the configuration be generated from the current database columns?', false) - ->expectsQuestion('Does the model use soft deletes?', false); + ->expectsQuestion('Does the model use soft-deletes?', false); require_once __DIR__ . '/../../../Fixtures/Models/Team.php'; require_once app_path('Filament/Resources/TeamResource.php'); @@ -349,7 +349,7 @@ $generateManageRelatedRecordsPageCommandQuestions = [ 'titleAttribute' => 'What is the title attribute for this model?', 'isGeneratedTable' => 'Should the table columns be generated from the current database columns?', 'hasViewOperation' => 'Would you like to generate a read-only view modal for the table?', - 'isSoftDeletable' => 'Does the related model use soft deletes?', + 'isSoftDeletable' => 'Does the related model use soft-deletes?', 'relationshipType' => 'What type of relationship is this?', ]; @@ -421,7 +421,7 @@ it('can generate a manage related records page class in a resource with a view o ->toMatchSnapshot(); }); -it('can generate a manage related records page class in a resource with soft deletes', function () use ($runGenerateManageRelatedRecordsPageCommand, $generateManageRelatedRecordsPageCommandQuestions): void { +it('can generate a manage related records page class in a resource with soft-deletes', function () use ($runGenerateManageRelatedRecordsPageCommand, $generateManageRelatedRecordsPageCommandQuestions): void { $questions = $generateManageRelatedRecordsPageCommandQuestions; $runGenerateManageRelatedRecordsPageCommand($this) diff --git a/tests/src/Panels/Commands/Legacy/LegacyMakeRelationManagerCommandTest.php b/tests/src/Panels/Commands/Legacy/LegacyMakeRelationManagerCommandTest.php index b6357ae3d2..5a62a4eb80 100644 --- a/tests/src/Panels/Commands/Legacy/LegacyMakeRelationManagerCommandTest.php +++ b/tests/src/Panels/Commands/Legacy/LegacyMakeRelationManagerCommandTest.php @@ -117,7 +117,7 @@ it('can generate a relation manager with a view operation', function (): void { ->toMatchSnapshot(); }); -it('can generate a relation manager with soft deletes', function (): void { +it('can generate a relation manager with soft-deletes', function (): void { $this->artisan('make:filament-relation-manager', [ 'resource' => 'Users', 'relationship' => 'teams', diff --git a/tests/src/Panels/Commands/Legacy/LegacyMakeResourceCommandTest.php b/tests/src/Panels/Commands/Legacy/LegacyMakeResourceCommandTest.php index 61bec9123e..bb36256864 100644 --- a/tests/src/Panels/Commands/Legacy/LegacyMakeResourceCommandTest.php +++ b/tests/src/Panels/Commands/Legacy/LegacyMakeResourceCommandTest.php @@ -104,7 +104,7 @@ it('can generate the form and table of a resource class', function (): void { ->toMatchSnapshot(); }); -it('can generate a resource class with soft deletes', function (): void { +it('can generate a resource class with soft-deletes', function (): void { $this->artisan('make:filament-resource', [ 'model' => 'Post', '--soft-deletes' => true, @@ -118,7 +118,7 @@ it('can generate a resource class with soft deletes', function (): void { ->toMatchSnapshot(); }); -it('can generate a resource edit page with soft deletes', function (): void { +it('can generate a resource edit page with soft-deletes', function (): void { $this->artisan('make:filament-resource', [ 'model' => 'Post', '--soft-deletes' => true, diff --git a/tests/src/Panels/Commands/MakePageCommandTest.php b/tests/src/Panels/Commands/MakePageCommandTest.php index 50185a6253..8af4ad6aac 100644 --- a/tests/src/Panels/Commands/MakePageCommandTest.php +++ b/tests/src/Panels/Commands/MakePageCommandTest.php @@ -294,7 +294,7 @@ $runGenerateManageRelatedRecordsPageCommand = function (TestCase $testCase): Pen '--no-interaction' => true, ]) ->expectsQuestion('Should the configuration be generated from the current database columns?', false) - ->expectsQuestion('Does the model use soft deletes?', false); + ->expectsQuestion('Does the model use soft-deletes?', false); $testCase->artisan('make:filament-resource', [ 'model' => 'User', @@ -303,7 +303,7 @@ $runGenerateManageRelatedRecordsPageCommand = function (TestCase $testCase): Pen ]) ->expectsQuestion('Would you like to generate a read-only view page for the resource?', false) ->expectsQuestion('Should the configuration be generated from the current database columns?', false) - ->expectsQuestion('Does the model use soft deletes?', false); + ->expectsQuestion('Does the model use soft-deletes?', false); require_once __DIR__ . '/../../Fixtures/Models/Team.php'; require_once app_path('Filament/Resources/Teams/TeamResource.php'); @@ -346,7 +346,7 @@ $generateManageRelatedRecordsPageCommandQuestions = [ 'infolistSchemaClass' => 'Which infolist schema class would you like to use?', 'hasTableClass' => 'Would you like to use an existing table class?', 'tableClass' => 'Which table class would you like to use?', - 'isSoftDeletable' => 'Does the related model use soft deletes?', + 'isSoftDeletable' => 'Does the related model use soft-deletes?', 'relationshipType' => 'What type of relationship is this?', ]; @@ -484,7 +484,7 @@ it('can generate a manage related records page class in a resource with a table ->toMatchSnapshot(); }); -it('can generate a manage related records page class in a resource with soft deletes', function () use ($runGenerateManageRelatedRecordsPageCommand, $generateManageRelatedRecordsPageCommandQuestions): void { +it('can generate a manage related records page class in a resource with soft-deletes', function () use ($runGenerateManageRelatedRecordsPageCommand, $generateManageRelatedRecordsPageCommandQuestions): void { $questions = $generateManageRelatedRecordsPageCommandQuestions; $runGenerateManageRelatedRecordsPageCommand($this) diff --git a/tests/src/Panels/Commands/MakeRelationManagerCommandTest.php b/tests/src/Panels/Commands/MakeRelationManagerCommandTest.php index 1b1232ce2d..5757de70b2 100644 --- a/tests/src/Panels/Commands/MakeRelationManagerCommandTest.php +++ b/tests/src/Panels/Commands/MakeRelationManagerCommandTest.php @@ -161,7 +161,7 @@ it('can generate a relation manager with a table class', function (): void { ->toMatchSnapshot(); }); -it('can generate a relation manager with soft deletes', function (): void { +it('can generate a relation manager with soft-deletes', function (): void { $this->artisan('make:filament-relation-manager', [ 'resource' => 'Users', 'relationship' => 'teams', diff --git a/tests/src/Panels/Commands/MakeResourceCommandTest.php b/tests/src/Panels/Commands/MakeResourceCommandTest.php index c55c875992..95b670a182 100644 --- a/tests/src/Panels/Commands/MakeResourceCommandTest.php +++ b/tests/src/Panels/Commands/MakeResourceCommandTest.php @@ -226,7 +226,7 @@ it('can generate the form, infolist, and table content embedded in a resource cl ->toMatchSnapshot(); }); -it('can generate a resource class with soft deletes', function (): void { +it('can generate a resource class with soft-deletes', function (): void { $this->artisan('make:filament-resource', [ 'model' => 'Post', '--soft-deletes' => true, @@ -240,7 +240,7 @@ it('can generate a resource class with soft deletes', function (): void { ->toMatchSnapshot(); }); -it('can generate a resource table with soft deletes', function (): void { +it('can generate a resource table with soft-deletes', function (): void { $this->artisan('make:filament-resource', [ 'model' => 'Post', '--soft-deletes' => true, @@ -254,7 +254,7 @@ it('can generate a resource table with soft deletes', function (): void { ->toMatchSnapshot(); }); -it('can generate a resource edit page with soft deletes', function (): void { +it('can generate a resource edit page with soft-deletes', function (): void { $this->artisan('make:filament-resource', [ 'model' => 'Post', '--soft-deletes' => true,