From 06d473ecf2a82159331f01a1a02c2a1e1facee9f Mon Sep 17 00:00:00 2001 From: Jasper Tey Date: Tue, 12 Nov 2024 00:27:14 -0500 Subject: [PATCH] Add some assertion messaging. --- tests/Generator/ActionMakeTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Generator/ActionMakeTest.php b/tests/Generator/ActionMakeTest.php index 2bdb1f2..f99c1f4 100644 --- a/tests/Generator/ActionMakeTest.php +++ b/tests/Generator/ActionMakeTest.php @@ -31,7 +31,7 @@ expect(Artisan::output())->when( Feature::IncludeFilepathInGeneratorCommandOutput->exists(), - fn ($output) => $output->toContainFilepath($relativePath), + fn($output) => $output->toContainFilepath($relativePath), ); expect(file_exists($expectedPath))->toBeTrue(); @@ -57,7 +57,7 @@ Artisan::call("ddd:action {$domain}:{$given}"); - expect(file_exists($expectedPath))->toBeTrue(); + expect(file_exists($expectedPath))->toBeTrue("ddd:action {$domain}:{$given} -> expected {$expectedPath} to exist."); })->with('makeActionInputs'); it('extends a base action if specified in config', function ($baseAction) { @@ -81,7 +81,7 @@ expect(file_exists($expectedPath))->toBeTrue(); - expect(file_get_contents($expectedPath))->toContain("class {$name} extends {$baseAction}".PHP_EOL.'{'); + expect(file_get_contents($expectedPath))->toContain("class {$name} extends {$baseAction}" . PHP_EOL . '{'); })->with([ 'BaseAction' => 'BaseAction', 'Base\Action' => 'Base\Action', @@ -107,5 +107,5 @@ Artisan::call("ddd:action {$domain}:{$name}"); expect(file_exists($expectedPath))->toBeTrue(); - expect(file_get_contents($expectedPath))->toContain("class {$name}".PHP_EOL.'{'); + expect(file_get_contents($expectedPath))->toContain("class {$name}" . PHP_EOL . '{'); });