public function testEventIsCleared() { $hasToBeTrue = false; Apricot::on('foo', function ($argument) use(&$hasToBeTrue) { $hasToBeTrue = $argument; }); // will delete the listener above Apricot::clear('foo'); Apricot::emit('foo', array(true)); $this->assertFalse($hasToBeTrue); }