public function testTraitPrepend() { $obj = new \EventableObject(true, true); $obj->on('my_event', function ($e, $o) use($obj) { $o->increment($e); }); $obj->trigger('my_event'); $this->assertEquals($obj->num, 2); }