Commit 4 of 4:
3a834a259f
change collection functions
previous
whole branch
Review threads live on the whole diff, not on one commit, so
none are shown here - a thread's line means something in the
branch's final form, and painting it into an intermediate
step would put it on code it is not about.
tests/FavoriteTest.php modified +2 -2 Changes to tests/FavoriteTest.php ⋯ 14 lines Show the 14 lines above this hunk @@ -15,7 +15,7 @@ it('can fetch all favorites', function () { 15 15 $favorites = Favorite : : get ( ) ; 16 16 17 17 $this - > assertTrue ( $favorites instanceof Collection ) ; 18 - $this - > assertTrue ( count ( $favorites ) > 0 ) ; 18 + $this - > assertTrue ( $favorites - > count ( ) > 0 ) ; 19 19 } ) ; 20 20 21 21 it ( 'can fetch specific group of favorites' , function ( ) { ⋯ 2 lines Show the 2 lines above this hunk @@ -24,7 +24,7 @@ it('can fetch specific group of favorites', function () { 24 24 $favorites = Favorite : : get ( $ids ) ; 25 25 26 26 $this - > assertTrue ( $favorites instanceof Collection ) ; 27 - $this - > assertTrue ( count ( $favorites ) = = = count ( $ids ) ) ; 27 + $this - > assertTrue ( $favorites - > count ( ) = = = count ( $ids ) ) ; 28 28 } ) ; 29 29 30 30 it ( 'can find a single favorite' , function ( ) {
tests/FolderTest.php modified +2 -2 Changes to tests/FolderTest.php ⋯ 14 lines Show the 14 lines above this hunk @@ -15,7 +15,7 @@ it('can fetch all folders', function () { 15 15 $folders = Folder : : get ( ) ; 16 16 17 17 $this - > assertTrue ( $folders instanceof Collection ) ; 18 - $this - > assertTrue ( count ( $folders ) > 0 ) ; 18 + $this - > assertTrue ( $folders - > count ( ) > 0 ) ; 19 19 } ) ; 20 20 21 21 it ( 'can search a folder' , function ( ) { ⋯ 13 lines Show the 13 lines above this hunk @@ -35,7 +35,7 @@ it('can fetch specific group of folders', function () { 35 35 $folders = Folder : : get ( $ids ) ; 36 36 37 37 $this - > assertTrue ( $folders instanceof Collection ) ; 38 - $this - > assertTrue ( count ( $folders ) = = = count ( $ids ) ) ; 38 + $this - > assertTrue ( $folders - > count ( ) = = = count ( $ids ) ) ; 39 39 } ) ; 40 40 41 41 it ( 'can find a single folder' , function ( ) {
tests/TagTest.php modified +3 -3 Changes to tests/TagTest.php ⋯ 16 lines Show the 16 lines above this hunk @@ -17,7 +17,7 @@ it('can fetch all tags', function () { 17 17 $tags = Tag : : get ( ) ; 18 18 19 19 $this - > assertTrue ( $tags instanceof Collection ) ; 20 - $this - > assertTrue ( count ( $tags ) > 0 ) ; 20 + $this - > assertTrue ( $tags - > count ( ) > 0 ) ; 21 21 } ) ; 22 22 23 23 it ( 'can fetch specific group of tags' , function ( ) { ⋯ 2 lines Show the 2 lines above this hunk @@ -26,7 +26,7 @@ it('can fetch specific group of tags', function () { 26 26 $tags = Tag : : get ( $ids ) ; 27 27 28 28 $this - > assertTrue ( $tags instanceof Collection ) ; 29 - $this - > assertTrue ( count ( $tags ) = = = count ( $ids ) ) ; 29 + $this - > assertTrue ( $tags - > count ( ) = = = count ( $ids ) ) ; 30 30 } ) ; 31 31 32 32 it ( 'can find a single tag' , function ( ) { ⋯ 19 lines Show the 19 lines above this hunk @@ -52,7 +52,7 @@ it('can fetch all media tags', function () { 52 52 $tags = $media - > tags ( ) - > get ( ) ; 53 53 54 54 $this - > assertTrue ( $tags instanceof Collection ) ; 55 - $this - > assertTrue ( count ( $tags [ 0 ] ) > 0 ) ; 55 + $this - > assertTrue ( $tags - > count ( ) > = 0 ) ; 56 56 } ) ; 57 57 58 58 it ( 'can fetch all folder tags' , function ( ) {