Skip to content

Commit

Permalink
Visualize NULL properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Sep 26, 2006
1 parent 5e23b94 commit 1a9c17e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions PHPUnit/Samples/FailureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ public function testAssertObjectEqualsObject()
$this->assertEquals($a, $b);
}

public function testAssertNullEqualsString()
{
$this->assertEquals(NULL, 'bar');
}

public function testAssertStringEqualsString()
{
$this->assertEquals('foo', 'bar');
Expand Down
3 changes: 2 additions & 1 deletion PHPUnit/Util/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ public static function toString($value)
if (!is_null($value)) {
$type = gettype($value) . ':';
} else {
$type = '';
$type = '';
$value = 'null';
}

if (is_bool($value)) {
Expand Down

0 comments on commit 1a9c17e

Please sign in to comment.