protected function caseNodesToSuiteProperties(array $nodeArray, array &$testCases = [])
    {
        $cb = [TestCase::class, 'caseFromNode'];

        return array_reduce($nodeArray, function ($result, $c) use (&$testCases, $cb) {
            $testCases[] = \call_user_func_array($cb, [$c]);
            $result['name'] = (string) $c['class'];
            $result['file'] = (string) $c['file'];
            ++$result['tests'];
            $result['assertions'] += (int) $c['assertions'];
            $result['failures'] += \count($c->xpath('failure'));
            $result['errors'] += \count($c->xpath('error'));
            $result['skipped'] += \count($c->xpath('skipped'));
            $result['time'] += (float) $c['time'];

            return $result;
        }, static::$defaultSuite);
    }