Skip to content

Commit

Permalink
Add some assertion messaging.
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperTey committed Nov 12, 2024
1 parent 26b193d commit 06d473e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/Generator/ActionMakeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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) {
Expand All @@ -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',
Expand All @@ -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 . '{');
});

0 comments on commit 06d473e

Please sign in to comment.