File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 4
4
5
5
use ArrayAccess ;
6
6
use ArrayIterator ;
7
+ use Countable ;
7
8
use Illuminate \Contracts \Support \Htmlable ;
8
9
use Illuminate \Support \Env ;
9
10
use Illuminate \Support \Optional ;
@@ -39,6 +40,21 @@ public function testClassBasename()
39
40
$ this ->assertSame ('Baz ' , class_basename ('Baz ' ));
40
41
}
41
42
43
+ public function testFilled ()
44
+ {
45
+ $ this ->assertFalse (filled (null ));
46
+ $ this ->assertFalse (filled ('' ));
47
+ $ this ->assertFalse (filled (' ' ));
48
+ $ this ->assertTrue (filled (10 ));
49
+ $ this ->assertTrue (filled (true ));
50
+ $ this ->assertTrue (filled (false ));
51
+ $ this ->assertTrue (filled (0 ));
52
+ $ this ->assertTrue (filled (0.0 ));
53
+
54
+ $ object = new SupportTestCountable ();
55
+ $ this ->assertFalse (filled ($ object ));
56
+ }
57
+
42
58
public function testValue ()
43
59
{
44
60
$ this ->assertSame ('foo ' , value ('foo ' ));
@@ -903,3 +919,11 @@ public function getIterator(): Traversable
903
919
return new ArrayIterator ($ this ->items );
904
920
}
905
921
}
922
+
923
+ class SupportTestCountable implements Countable
924
+ {
925
+ public function count (): int
926
+ {
927
+ return 0 ;
928
+ }
929
+ }
You can’t perform that action at this time.
0 commit comments