mirror of
https://github.com/pestphp/pest.git
synced 2026-03-11 02:07:23 +01:00
tests: unexpected output
This commit is contained in:
@ -808,6 +808,9 @@
|
||||
PASS Tests\Fixtures\ExampleTest
|
||||
✓ it example 2
|
||||
|
||||
WARN Tests\Fixtures\UnexpectedOutput
|
||||
- output
|
||||
|
||||
PASS Tests\Helpers\TestInHelpers
|
||||
✓ it executes tests in the Helpers directory
|
||||
|
||||
@ -1035,7 +1038,11 @@
|
||||
✓ todo
|
||||
✓ todo in parallel
|
||||
|
||||
PASS Tests\Visual\UnexpectedOutput
|
||||
✓ unexpected output with ([''])
|
||||
✓ unexpected output with (['--parallel'])
|
||||
|
||||
PASS Tests\Visual\Version
|
||||
✓ visual snapshot of help command output
|
||||
|
||||
Tests: 2 deprecated, 3 warnings, 4 incomplete, 1 notice, 8 todos, 17 skipped, 716 passed (1733 assertions)
|
||||
Tests: 2 deprecated, 3 warnings, 4 incomplete, 1 notice, 8 todos, 18 skipped, 718 passed (1735 assertions)
|
||||
23
tests/.snapshots/unexpected-output-parallel.txt
Normal file
23
tests/.snapshots/unexpected-output-parallel.txt
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
.this is unexpected output!
|
||||
────────────────────────────────────────────────────────────────────────────
|
||||
RISKY Tests\Fixtures\UnexpectedOutput > output
|
||||
This test printed output: this is unexpected output
|
||||
|
||||
at src/Support/StateGenerator.php:58
|
||||
54▕ foreach ($riskyEvents as $riskyEvent) {
|
||||
55▕ $state->add(TestResult::fromPestParallelTestCase(
|
||||
56▕ $riskyEvent->test(),
|
||||
57▕ TestResult::RISKY,
|
||||
➜ 58▕ ThrowableBuilder::from(new TestOutcome($riskyEvent->message()))
|
||||
59▕ ));
|
||||
60▕ }
|
||||
61▕ }
|
||||
62▕
|
||||
|
||||
1 src/Support/StateGenerator.php:58
|
||||
+5 vendor frames
|
||||
7 src/Plugins/Actions/CallsHandleArguments.php:29
|
||||
|
||||
|
||||
Tests: 1 risky, 1 passed (2 assertions)
|
||||
20
tests/.snapshots/unexpected-output.txt
Normal file
20
tests/.snapshots/unexpected-output.txt
Normal file
@ -0,0 +1,20 @@
|
||||
this is unexpected output
|
||||
WARN Tests\Fixtures\UnexpectedOutput
|
||||
! output → This test printed output: this is unexpected output
|
||||
────────────────────────────────────────────────────────────────────────────
|
||||
RISKY Tests\Fixtures\UnexpectedOutput > output
|
||||
This test printed output: this is unexpected output
|
||||
|
||||
at src/Kernel.php:86
|
||||
82▕ {
|
||||
83▕ $args = CallsHandleArguments::execute($args);
|
||||
84▕
|
||||
85▕ try {
|
||||
➜ 86▕ $this->application->run($args);
|
||||
87▕ } catch (NoDirtyTestsFound) {
|
||||
88▕ $this->output->writeln([
|
||||
89▕ '',
|
||||
90▕ ' INFO No tests found.',
|
||||
|
||||
|
||||
Tests: 1 risky (1 assertions)
|
||||
Reference in New Issue
Block a user