Skip to content

Commit

Permalink
[9.x] Improve test for blank in Helpers (#43887)
Browse files Browse the repository at this point in the history
* [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
  • Loading branch information
moharami authored Aug 29, 2022
1 parent c3befd2 commit 8a02e8f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/Support/SupportHelpersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@ public function testE()
$this->assertEquals($str, e($html));
}

public function testBlank()
{
$this->assertTrue(blank(null));
$this->assertTrue(blank(''));
$this->assertTrue(blank(' '));
$this->assertFalse(blank(10));
$this->assertFalse(blank(true));
$this->assertFalse(blank(false));
$this->assertFalse(blank(0));
$this->assertFalse(blank(0.0));

$object = new SupportTestCountable();
$this->assertTrue(blank($object));
}

public function testClassBasename()
{
$this->assertSame('Baz', class_basename('Foo\Bar\Baz'));
Expand Down

0 comments on commit 8a02e8f

Please sign in to comment.