Skip to content

Commit ea8c67b

Browse files
Add assertCount for filesystem doc (#10041)
* Add assertCount for filesystem doc * Update filesystem.md --------- Co-authored-by: Taylor Otwell <taylor@laravel.com>
1 parent 0db6ab2 commit ea8c67b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

filesystem.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,9 @@ test('albums can be uploaded', function () {
701701
Storage::disk('photos')->assertMissing('missing.jpg');
702702
Storage::disk('photos')->assertMissing(['missing.jpg', 'non-existing.jpg']);
703703

704+
// Assert that the number of files in a given directory matches the expected count...
705+
Storage::disk('photos')->assertCount('/wallpapers', 2);
706+
704707
// Assert that a given directory is empty...
705708
Storage::disk('photos')->assertDirectoryEmpty('/wallpapers');
706709
});
@@ -734,6 +737,9 @@ class ExampleTest extends TestCase
734737
Storage::disk('photos')->assertMissing('missing.jpg');
735738
Storage::disk('photos')->assertMissing(['missing.jpg', 'non-existing.jpg']);
736739

740+
// Assert that the number of files in a given directory matches the expected count...
741+
Storage::disk('photos')->assertCount('/wallpapers', 2);
742+
737743
// Assert that a given directory is empty...
738744
Storage::disk('photos')->assertDirectoryEmpty('/wallpapers');
739745
}

0 commit comments

Comments
 (0)