// The execute() method expects $status by reference, so we initialize it
// to some value we don't expect back.
$status = -1; $test_run = TestRun::createNew($storage); $results = $runner->execute($test_run, ['SomeTest'], $status);
// Make sure our status code made the round trip.
$this->assertEquals(TestStatus::EXCEPTION, $status);
// A serious error in runCommand() should give us a fixed set of results.
$row = reset($results); $fail_row = [ 'test_id' => $test_id, 'test_class' => 'SomeTest', 'status' => TestStatus::label(TestStatus::EXCEPTION),
/**
* tag v6.6.0 Return type will be natively typed to `static`
*
* @return static
*/ #[\ReturnTypeWillChange]
publicfunctionfilter(\Closure $closure) { return$this->createNew(array_filter($this->elements, $closure)); }
/**
* tag v6.6.0 Return type will be natively typed to `static`
*
* @return static
*/ #[\ReturnTypeWillChange]
publicfunctionslice(int $offset, ?int $length = null) { return$this->createNew(\array_slice($this->elements, $offset, $length, true)); }