public function test_identical() { assert_identical(1, 1); assert_identical(true, true); assert_fails(function () { assert_identical(1, "1"); }); assert_fails(function () { assert_identical(true, 1); }); }
public function test_literal_or_object_returns_same_object() { $value = new phpx\Literal("echo 'foo';"); assert_identical($value, phpx\literal_or_object($value)); }
function test_save_default_value() { $c = new TestActiveData(); assert_identical($c->foobar, 'foo'); $c->foo = ''; assert_identical($c->foobar, 'foo'); $c = new TestActiveData(); $c->foo = ''; assert_identical($c->foobar, 'bar'); $c->foo = 'non-empty'; assert_identical($c->foobar, 'bar'); }