We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 057ae36 commit 8b947d9Copy full SHA for 8b947d9
src/Testing/FakeFolderRepository.php
@@ -60,8 +60,15 @@ public function firstOrCreate(string $path): FolderInterface
60
*/
61
public function get(?string $match = '*', ?string $reference = ''): FolderCollection
62
{
63
- return FolderCollection::make($this->folders)->filter(
64
- fn (FolderInterface $folder) => Str::is($match, $folder->path())
65
- );
+ $folders = FolderCollection::make($this->folders);
+
+ // If we're not matching all, filter the folders by the match pattern.
66
+ if (! in_array($match, ['*', null])) {
67
+ return $folders->filter(
68
+ fn (FolderInterface $folder) => Str::is($match, $folder->path())
69
+ );
70
+ }
71
72
+ return $folders;
73
}
74
0 commit comments