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)
176176 *
177177 * @return $this
178178 *
179+ * @internal For testing purposes only.
179180 * @testTag only available to test code
180181 */
181182 public function pretend (bool $ pretend = true )
Original file line number Diff line number Diff line change 1313
1414use CodeIgniter \CLI \CLI ;
1515use CodeIgniter \Events \Events ;
16- use CodeIgniter \HTTP \Response ;
17- use Config \App ;
1816use Tests \Support \Test \TestForReflectionHelper ;
1917
2018/**
@@ -74,31 +72,6 @@ public function testStreamFilter(): void
7472 $ this ->assertSame ($ expected , $ this ->getStreamFilterBuffer ());
7573 }
7674
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-
10275 public function testCloseEnough (): void
10376 {
10477 $ this ->assertCloseEnough (1 , 1 );
You can’t perform that action at this time.
0 commit comments