Jyxo\Beholder\Executor::runTest PHP Method

runTest() private method

Runs a single test.
private runTest ( string $ident ) : array
$ident string Test identifier
return array
    private function runTest(string $ident) : array
    {
        // Runs the test
        $timer = \Jyxo\Timer::start();
        $result = $this->tests[$ident]->run();
        if (!$result instanceof \Jyxo\Beholder\Result) {
            throw new \UnexpectedValueException(sprintf('Result %s of the test %s is not a %s instance.', $result, $ident, \Jyxo\Beholder\Result::class));
        }
        // Returns result data
        return ['ident' => $ident, 'test' => $this->tests[$ident], 'result' => $result, 'duration' => \Jyxo\Timer::stop($timer)];
    }