Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workaround for buffer problem #1242

Merged
merged 2 commits into from
Sep 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tests/system/CLI/ConsoleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ public function testRun()
$console->run(true);
$result = CITestStreamFilter::$buffer;

// close open buffer
ob_end_clean();

// make sure the result looks like a command list
$this->assertContains('Lists the available commands.', $result);
$this->assertContains('Displays basic usage information.', $result);
Expand Down
10 changes: 10 additions & 0 deletions tests/system/CodeIgniterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ public function setUp()
$this->codeigniter = new MockCodeIgniter($config);
}

public function tearDown()
{
parent::tearDown();

if( count( ob_list_handlers() ) > 1 )
{
ob_end_clean();
}
}

//--------------------------------------------------------------------

public function testRunDefaultRoute()
Expand Down
3 changes: 3 additions & 0 deletions tests/system/Test/FeatureTestCaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ public function testCallGet()
]);
$response = $this->get('home');

// close open buffer
ob_end_clean();

$response->assertSee('Hello World');
$response->assertDontSee('Again');
}
Expand Down