Skip to content

Commit 8a02e8f

Browse files
authored
[9.x] Improve test for blank in Helpers (#43887)
* [9.x] Improve test for blank in Helpers * [9.x] Improve test for blank in Helpers * [9.x] Improve test for blank in Helpers fix style code
1 parent c3befd2 commit 8a02e8f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/Support/SupportHelpersTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,21 @@ public function testE()
3434
$this->assertEquals($str, e($html));
3535
}
3636

37+
public function testBlank()
38+
{
39+
$this->assertTrue(blank(null));
40+
$this->assertTrue(blank(''));
41+
$this->assertTrue(blank(' '));
42+
$this->assertFalse(blank(10));
43+
$this->assertFalse(blank(true));
44+
$this->assertFalse(blank(false));
45+
$this->assertFalse(blank(0));
46+
$this->assertFalse(blank(0.0));
47+
48+
$object = new SupportTestCountable();
49+
$this->assertTrue(blank($object));
50+
}
51+
3752
public function testClassBasename()
3853
{
3954
$this->assertSame('Baz', class_basename('Foo\Bar\Baz'));

0 commit comments

Comments
 (0)