private function registerEvents()
    {
        $this->eventEmitter->on('runner.end', [$this, 'setTime']);

        $this->eventEmitter->on('test.failed', function (Test $test, $e) {
            $this->errors[] = [$test, $e];
        });

        $this->eventEmitter->on('test.passed', function () {
            $this->passing++;
        });

        $this->eventEmitter->on('test.pending', function () {
            $this->pending++;
        });
    }