Skip to content

Commit

Permalink
Add test for --debug CLI option
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed May 2, 2024
1 parent 7a07c2f commit bf88e5b
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/end-to-end/generic/debug.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
--TEST--
phpunit --debug ../../_files/BankAccountTest.php
--FILE--
<?php declare(strict_types=1);
$_SERVER['argv'][] = '--do-not-cache-result';
$_SERVER['argv'][] = '--no-configuration';
$_SERVER['argv'][] = '--debug';
$_SERVER['argv'][] = __DIR__ . '/../_files/basic/SuccessTest.php';

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

(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
--EXPECTF--
PHPUnit Started (PHPUnit %s using %s)
Test Runner Configured
Test Suite Loaded (1 test)
Event Facade Sealed
Test Runner Started
Test Suite Sorted
Test Runner Execution Started (1 test)
Test Suite Started (PHPUnit\TestFixture\Basic\SuccessTest, 1 test)
Test Preparation Started (PHPUnit\TestFixture\Basic\SuccessTest::testOne)
Test Prepared (PHPUnit\TestFixture\Basic\SuccessTest::testOne)
Assertion Succeeded (Constraint: is true, Value: true)
Test Passed (PHPUnit\TestFixture\Basic\SuccessTest::testOne)
Test Finished (PHPUnit\TestFixture\Basic\SuccessTest::testOne)
Test Suite Finished (PHPUnit\TestFixture\Basic\SuccessTest, 1 test)
Test Runner Execution Finished
Test Runner Finished
PHPUnit Finished (Shell Exit Code: 0)

0 comments on commit bf88e5b

Please sign in to comment.