Skip to content

Commit e5fd33d

Browse files
committed
Initial beefing up of Popcorn & FeatureTestCaseTest
1 parent c74ae90 commit e5fd33d

3 files changed

Lines changed: 19 additions & 5 deletions

File tree

tests/_support/Controllers/Popcorn.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,19 @@ public function index3()
5555
return $response;
5656
}
5757

58+
public function canyon()
59+
{
60+
echo 'Hello-o-o';
61+
}
62+
63+
public function json()
64+
{
65+
$this->responsd(['answer' => 42]);
66+
}
67+
68+
public function xml()
69+
{
70+
$this->respond('<my><pet>cat</pet></my>');
71+
}
72+
5873
}

tests/system/Test/FeatureTestCaseTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
use CodeIgniter\Test\FeatureResponse;
55

66
/**
7-
* @group DatabaseLive
7+
* @group DatabaseLive
8+
* @runTestsInSeparateProcesses
9+
* @preserveGlobalState disabled
810
*/
911
class FeatureTestCaseTest extends FeatureTestCase
1012
{
@@ -30,9 +32,6 @@ function () {
3032
]);
3133
$response = $this->get('home');
3234

33-
// close open buffer
34-
ob_end_clean();
35-
3635
$response->assertSee('Hello World');
3736
$response->assertDontSee('Again');
3837
}

tests/system/Test/TestCaseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function testStreamFilter()
5353
CITestStreamFilter::$buffer = '';
5454
$this->stream_filter = stream_filter_append(STDOUT, 'CITestStreamFilter');
5555
\CodeIgniter\CLI\CLI::write('first.');
56-
$expected = "first.\n";
56+
$expected = "\nfirst.\n";
5757
$this->assertEquals($expected, CITestStreamFilter::$buffer);
5858
stream_filter_remove($this->stream_filter);
5959
}

0 commit comments

Comments
 (0)