public function testCallShouldRemoveCallbackIfLimitExceeded() { $event = new Event('foo'); $event->addCallback(function () { }, 1); $this->assertCount(1, $event->getCallbacks()); $event->call(); $event->call(); $this->assertCount(0, $event->getCallbacks()); }