Created
July 19, 2012 04:16
-
-
Save walf443/3140713 to your computer and use it in GitHub Desktop.
nullでも警告なしにすっぽ抜けるのね...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php<?php | |
require_once('lib/TestTap.php'); | |
$t = new TestTap(); | |
$t->subtest("nullのケース", function($t) { | |
$a = null; | |
$t->is($a, null, "null ok"); | |
$t->is($a['xxxxx'], null, "null ok"); | |
}); | |
$t->subtest('emptyにnullを渡すとtrueになる', function($t) { | |
$a = null; | |
$t->is(empty($a), true, "trueになること"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment