Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
milo authored and dg committed Jan 31, 2021
1 parent e42b873 commit d4d0e59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Framework/DataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class DataProvider
public static function load(string $file, string $query = ''): array
{
if (!is_file($file)) {
throw new \Exception("Missing data-provider file '$file'.");
throw new \Exception("Missing data provider file '$file'.");
}

if (pathinfo($file, PATHINFO_EXTENSION) === 'php') {
Expand All @@ -33,13 +33,13 @@ public static function load(string $file, string $query = ''): array
if ($data instanceof \Traversable) {
$data = iterator_to_array($data);
} elseif (!is_array($data)) {
throw new \Exception("Data provider file '$file' did not return array or Traversable.");
throw new \Exception("Data provider '$file' did not return array or Traversable.");
}

} else {
$data = @parse_ini_file($file, true); // @ is escalated to exception
if ($data === false) {
throw new \Exception("Cannot parse data-provider file '$file'.");
throw new \Exception("Cannot parse data provider file '$file'.");
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Runner/Runner.annotations.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ $cli = PHP_SAPI === 'cli';
$path = __DIR__ . DIRECTORY_SEPARATOR . 'annotations' . DIRECTORY_SEPARATOR;

Assert::same([
['dataProvider.error.phptx', Test::FAILED, "Missing data-provider file '{$path}missing.ini'."],
['dataProvider.error.phptx', Test::FAILED, "Missing data provider file '{$path}missing.ini'."],
['exitCode.die.phptx', Test::PASSED, null],
['exitCode.error1.phptx', Test::FAILED, 'Exited with error code 231 (expected 1)'],
['exitCode.error2.phptx', Test::FAILED, 'Exited with error code 231 (expected 0)'],
Expand Down

0 comments on commit d4d0e59

Please sign in to comment.