Skip to content

Commit 7922385

Browse files
Add comments explaining @runInSeparateProcess usage
The output buffer callback calls header() which requires a separate process since PHPUnit has already started output.
1 parent 42f9d6d commit 7922385

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/phpunit/tests/media/wpCrossOriginIsolation.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ public function test_returns_early_when_no_screen() {
6464
}
6565

6666
/**
67+
* This test must run in a separate process because the output buffer
68+
* callback sends HTTP headers via header(), which would fail in the
69+
* main PHPUnit process where output has already started.
70+
*
6771
* @ticket 64766
6872
*
6973
* @runInSeparateProcess
@@ -121,6 +125,10 @@ public function test_does_not_start_output_buffer_for_safari() {
121125
}
122126

123127
/**
128+
* This test must run in a separate process because the output buffer
129+
* callback sends HTTP headers via header(), which would fail in the
130+
* main PHPUnit process where output has already started.
131+
*
124132
* @ticket 64766
125133
*
126134
* @runInSeparateProcess

0 commit comments

Comments
 (0)