Skip to content

Commit bbfdc60

Browse files
Delete code that is no longer needed
1 parent c27ffaf commit bbfdc60

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

src/Framework/TestSuite.php

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ protected function addTestMethod(ReflectionClass $class, ReflectionMethod $metho
515515
"The data provider specified for %s::%s is invalid\n%s",
516516
$className,
517517
$methodName,
518-
$this->throwableToString($e),
518+
$this->exceptionToString($e),
519519
),
520520
);
521521

@@ -568,27 +568,18 @@ private function methodDoesNotExistOrIsDeclaredInTestCase(string $methodName): b
568568
/**
569569
* @throws Exception
570570
*/
571-
private function throwableToString(Throwable $t): string
571+
private function exceptionToString(InvalidDataProviderException $e): string
572572
{
573-
$message = $t->getMessage();
573+
$message = $e->getMessage();
574574

575575
if (trim($message) === '') {
576576
$message = '<no message>';
577577
}
578578

579-
if ($t instanceof InvalidDataProviderException) {
580-
return sprintf(
581-
"%s\n%s",
582-
$message,
583-
Filter::stackTraceFromThrowableAsString($t),
584-
);
585-
}
586-
587579
return sprintf(
588-
"%s: %s\n%s",
589-
$t::class,
580+
"%s\n%s",
590581
$message,
591-
Filter::stackTraceFromThrowableAsString($t),
582+
Filter::stackTraceFromThrowableAsString($e),
592583
);
593584
}
594585

0 commit comments

Comments
 (0)