assert_strict_equal() публичный статический Метод

assert that $a is strictly equal to $b. Uses === for comparison
public static assert_strict_equal ( mixed $a, mixed $b, string $msg = null )
$a mixed the actual value
$b mixed the expected value
$msg string optional description of assertion
Пример #1
0
    fu::strict_equal(true, fu::assert_not_equal(null, 1)['result'], "null and 1 are not 'equal'");
    fu::strict_equal(true, fu::assert_not_equal(true, null)['result'], "false and null are not 'equal'");
    fu::strict_equal(true, fu::assert_not_equal(array('0'), null)['result'], "array('0') and null are not 'equal'");
});
fu::test('FUnit::assert_strict_equal tests', function () {
    fu::strict_equal(true, fu::assert_strict_equal(1, 1)['result'], "1 and 1 are strict equal");
    fu::strict_equal(true, fu::assert_strict_equal("a", "a")['result'], "'a' and 'a' are strict equal");
    $a = new StdClass();
    $b = $a;
    fu::strict_equal(true, fu::assert_strict_equal($a, $b)['result'], "\$a and \$b refer to same object, so strict equal");
    fu::strict_equal(false, fu::assert_strict_equal(new stdClass(), new stdClass())['result'], "new stdClass and new stdClass are not strict equal");
    fu::strict_equal(false, fu::assert_strict_equal(1, "1")['result'], "1 and '1' are not strict equal");
    fu::strict_equal(false, fu::assert_strict_equal(1, true)['result'], "1 and true are not strict equal");
    fu::strict_equal(false, fu::assert_strict_equal(null, 0)['result'], "null and 0 are not strict equal");
    fu::strict_equal(false, fu::assert_strict_equal(false, null)['result'], "false and null are not strict equal");
    fu::strict_equal(false, fu::assert_strict_equal(array(), null)['result'], "array() and null are not strict equal");
});
fu::test('FUnit::assert_not_strict_equal tests', function () {
    fu::strict_equal(false, fu::assert_not_strict_equal(1, 1)['result'], "1 and 1 are strict equal");
    fu::strict_equal(false, fu::assert_not_strict_equal("a", "a")['result'], "'a' and 'a' are strict equal");
    $a = new StdClass();
    $b = $a;
    fu::strict_equal(false, fu::assert_not_strict_equal($a, $b)['result'], "\$a and \$b refer to same object, so strict equal");
    fu::strict_equal(true, fu::assert_not_strict_equal(new stdClass(), new stdClass())['result'], "new stdClass and new stdClass are not strict equal");
    fu::strict_equal(true, fu::assert_not_strict_equal(1, "1")['result'], "1 and '1' are not strict equal");
    fu::strict_equal(true, fu::assert_not_strict_equal(1, true)['result'], "1 and true are not strict equal");
    fu::strict_equal(true, fu::assert_not_strict_equal(null, 0)['result'], "null and 0 are not strict equal");
    fu::strict_equal(true, fu::assert_not_strict_equal(false, null)['result'], "false and null are not strict equal");
    fu::strict_equal(true, fu::assert_not_strict_equal(array(), null)['result'], "array() and null are not strict equal");
});
fu::test('FUnit::assert_throws tests', function () {