Skip to content

Commit

Permalink
used ::class
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Feb 27, 2019
1 parent b7da70e commit 13d79f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Framework/Dumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public static function dumpException(\Throwable $e): string
if ($e instanceof AssertException && $item['file'] === __DIR__ . DIRECTORY_SEPARATOR . 'Assert.php') {
continue;
}
$line = $item['class'] === 'Tester\Assert' && method_exists($item['class'], $item['function'])
$line = $item['class'] === Assert::class && method_exists($item['class'], $item['function'])
&& strpos($tmp = file($item['file'])[$item['line'] - 1], "::$item[function](") ? $tmp : null;

$s .= 'in '
Expand Down
6 changes: 3 additions & 3 deletions src/Framework/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public static function setup(): void
self::setupColors();
self::$obLevel = ob_get_level();

class_exists('Tester\Runner\Job');
class_exists('Tester\Dumper');
class_exists('Tester\Assert');
class_exists(Runner\Job::class);
class_exists(Dumper::class);
class_exists(Assert::class);

$annotations = self::getTestAnnotations();
self::$checkAssertions = !isset($annotations['outputmatch']) && !isset($annotations['outputmatchfile']);
Expand Down
2 changes: 1 addition & 1 deletion src/Runner/PhpInterpreter.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function __construct(string $path, array $args = [])
$output = stream_get_contents($pipes[1]);
proc_close($proc);

$args = ' ' . implode(' ', array_map(['Tester\Helpers', 'escapeArg'], $args));
$args = ' ' . implode(' ', array_map([Helpers::class, 'escapeArg'], $args));
if (strpos($output, 'phpdbg') !== false) {
$args = ' -qrrb -S cli' . $args;
}
Expand Down

0 comments on commit 13d79f0

Please sign in to comment.