Skip to content

Commit

Permalink
Add test for --configuration CLI option being used with path to confi…
Browse files Browse the repository at this point in the history
…guration file that does not exist
  • Loading branch information
sebastianbergmann committed May 2, 2024
1 parent bf88e5b commit acee377
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/end-to-end/generic/configuration-does-not-exist.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--TEST--
phpunit --configuration does-not-exist.xml
--FILE--
<?php declare(strict_types=1);
$_SERVER['argv'][] = '--do-not-cache-result';
$_SERVER['argv'][] = '--configuration';
$_SERVER['argv'][] = 'does-not-exist.xml';

require_once __DIR__ . '/../../bootstrap.php';

(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.

Could not read XML from file "does-not-exist.xml"

0 comments on commit acee377

Please sign in to comment.