public function test() { $event = new Event('foo'); $this->assertSame('foo', $event->getName()); $event->addCallback(function () { }); $event->addCallback(new Callback(function () { })); $this->assertCount(2, $event->getCallbacks()); }