expectException(InvalidArgumentException::class); Event::on('badEventName', fn () => null); $this->expectException(InvalidArgumentException::class); Event::fire('badEventName', []); } public function testBindAndFire(): void { $fn = static function($value = false) { static::assertTrue($value); }; Event::on(Event::INPUT_KEY, $fn); Event::fire(Event::INPUT_KEY, TRUE); } }