File tree Expand file tree Collapse file tree 2 files changed +1
-27
lines changed Expand file tree Collapse file tree 2 files changed +1
-27
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ public function __construct($config)
176
176
*
177
177
* @return $this
178
178
*
179
+ * @internal For testing purposes only.
179
180
* @testTag only available to test code
180
181
*/
181
182
public function pretend (bool $ pretend = true )
Original file line number Diff line number Diff line change 13
13
14
14
use CodeIgniter \CLI \CLI ;
15
15
use CodeIgniter \Events \Events ;
16
- use CodeIgniter \HTTP \Response ;
17
- use Config \App ;
18
16
use Tests \Support \Test \TestForReflectionHelper ;
19
17
20
18
/**
@@ -74,31 +72,6 @@ public function testStreamFilter(): void
74
72
$ this ->assertSame ($ expected , $ this ->getStreamFilterBuffer ());
75
73
}
76
74
77
- /**
78
- * PHPunit emits headers before we get nominal control of
79
- * the output stream, making header testing awkward, to say
80
- * the least. This test is intended to make sure that this
81
- * is happening as expected.
82
- *
83
- * TestCaseEmissionsTest is intended to circumvent PHPunit,
84
- * and allow us to test our own header emissions.
85
- */
86
- public function testPHPUnitHeadersEmitted (): void
87
- {
88
- $ response = new Response (new App ());
89
- $ response ->pretend (true );
90
-
91
- $ body = 'Hello ' ;
92
- $ response ->setBody ($ body );
93
-
94
- ob_start ();
95
- $ response ->send ();
96
- ob_end_clean ();
97
-
98
- $ this ->assertHeaderEmitted ('Content-type: text/html; ' );
99
- $ this ->assertHeaderNotEmitted ('Set-Cookie: foo=bar; ' );
100
- }
101
-
102
75
public function testCloseEnough (): void
103
76
{
104
77
$ this ->assertCloseEnough (1 , 1 );
You can’t perform that action at this time.
0 commit comments