Skip to content

Commit 449428b

Browse files
Boris Vujicicramsey
authored andcommitted
fix: return new instance of Finder for each use
fix #35
1 parent 087dbaa commit 449428b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/LibraryStarterKit/Setup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function getFilesystem(): Filesystem
9191
*/
9292
public function getFinder(): Finder
9393
{
94-
return $this->finder;
94+
return $this->finder::create();
9595
}
9696

9797
/**

tests/LibraryStarterKit/SetupTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public function setUp(): void
4242

4343
/** @var Finder & MockInterface $finder */
4444
$finder = $this->mockery(Finder::class);
45+
$finder->shouldReceive('create')->andReturn(clone $finder);
4546

4647
$project = new Project('a-project-name', $this->appPath);
4748

0 commit comments

Comments
 (0)