public function testStopListeningRemovesListener() { $callback = 'beforePerformEventCallback'; $event = 'beforePerform'; Event::listen($event, array($this, $callback)); Event::stopListening($event, array($this, $callback)); $job = $this->getEventTestJob(); $this->worker->perform($job); $this->worker->work(0); $this->assertNotContains($callback, $this->callbacksHit, $event . ' callback (' . $callback . ') was called though Event::stopListening was called'); }