public static function getTestSignature(\PHPUnit_Framework_TestCase $testCase) { if ($testCase instanceof TestCase\Interfaces\Descriptive) { return $testCase->getSignature(); } return get_class($testCase) . '::' . $testCase->getName(false); }
/** * @param \PHPUnit_Framework_TestCase $test * @param bool $inProgress * @return Message */ protected function getTestMessage(\PHPUnit_Framework_TestCase $test, $inProgress = false) { if (!$test instanceof TestCase) { return $this->message = $this->message($test->toString())->style('focus')->prepend($inProgress ? 'Running ' : ''); } $filename = $test->getSignature(); if ($test->getFeature()) { return $this->message = $this->message("<focus>%s</focus> (%s) ")->prepend($inProgress ? 'Trying to ' : '')->with($inProgress ? $test->getFeature() : ucfirst($test->getFeature()), $filename); } return $this->message = $this->message("<focus>%s</focus> ")->prepend($inProgress ? 'Running ' : '')->with($filename); }