Skip to content

Commit

Permalink
Use model instead of class to support laravel 10 tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspertey committed Nov 10, 2024
1 parent d3d5732 commit 9258452
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/Command/StubTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,17 @@
$options = app('ddd')->stubs()->allStubs();

$matches = collect($options)
->filter(fn ($stub, $path) => str($stub)->contains('class'))
->filter(fn ($stub, $path) => str($stub)->contains('model'))
->all();

$this
->artisan('ddd:stub')
->expectsQuestion('What do you want to do?', 'some')
->expectsSearch(
'Which stub should be published?',
search: 'class',
search: 'model',
answers: $matches,
answer: ['class.stub']
answer: ['model.stub']
)
->assertSuccessful()
->execute();
Expand All @@ -123,5 +123,5 @@

expect(count($stubFiles))->toEqual(1);

expect($stubFiles[0]->getFilename())->toEqual('class.stub');
expect($stubFiles[0]->getFilename())->toEqual('model.stub');
});

0 comments on commit 9258452

Please sign in to comment.