5 require_once(
"libs/composer/vendor/autoload.php");
20 $m = $this->mock->withOnLoadCode(
function($id) {
21 return "Its me, $id!";
24 $binder = $m->getOnLoadCode();
25 $this->assertInstanceOf(\Closure::class, $binder);
26 $this->assertEquals(
"Its me, Mario!", $binder(
"Mario"));
31 $this->mock->withOnLoadCode(
function() {});
32 $this->assertFalse(
"This should not happen...");
35 $this->assertTrue(
true);
41 $this->mock->withOnLoadCode(
function($id, $some_arg) {});
42 $this->assertFalse(
"This should not happen...");
45 $this->assertTrue(
true);
test_withOnLoadCode_false_closure_1()
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
test_withOnLoadCode_false_closure_2()