Skip to content

Commit eee0755

Browse files
No need to check for json_last_error_msg() with PHPUnit 5
1 parent 6bc2bbe commit eee0755

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Util/Test.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,10 +471,9 @@ public static function getDataFromTestWithAnnotation($docComment)
471471
$dataSet = json_decode($candidateRow, true);
472472

473473
if (json_last_error() != JSON_ERROR_NONE) {
474-
$error = function_exists('json_last_error_msg') ? json_last_error_msg() : json_last_error();
475474

476475
throw new PHPUnit_Framework_Exception(
477-
'The dataset for the @testWith annotation cannot be parsed: ' . $error
476+
'The dataset for the @testWith annotation cannot be parsed: ' . json_last_error_msg()
478477
);
479478
}
480479

0 commit comments

Comments
 (0)