public function testData() { $obj = new Prototype(); $obj->a = 1; $obj->b = 'John'; $obj->c = true; $obj->d = Prototype::dynamic(function () { return 'Doe'; }); $this->assertEquals(array('a' => 1, 'b' => 'John', 'c' => true, 'd' => 'Doe'), Prototype::data($obj)); }