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

Testing output buffer not closed #1230

Closed
jim-parry opened this issue Sep 21, 2018 · 2 comments
Closed

Testing output buffer not closed #1230

jim-parry opened this issue Sep 21, 2018 · 2 comments
Labels
bug Verified issues on the current code behavior or pull requests that will fix them testing Pull requests that changes tests only

Comments

@jim-parry
Copy link
Contributor

A change was made at some point over the last few months, which results in some tests being flagged as "risky". The travis-ci builds, but the risky tests mess up code coverage.

CodeIgniter 4 version
develop

Affected module(s)
Travis-ci log excerpt:

  1. CodeIgniter\CodeIgniterTest::testRunDefaultRoute
    Test code or tested code did not (only) close its own output buffers
  2. CodeIgniter\CodeIgniterTest::testRunEmptyDefaultRoute
    Test code or tested code did not (only) close its own output buffers
  3. CodeIgniter\CodeIgniterTest::testRun404Override
    Test code or tested code did not (only) close its own output buffers
  4. CodeIgniter\CodeIgniterTest::testControllersCanReturnString
    Test code or tested code did not (only) close its own output buffers
  5. CodeIgniter\CodeIgniterTest::testControllersCanReturnResponseObject
    Test code or tested code did not (only) close its own output buffers
  6. CodeIgniter\CodeIgniterTest::testRoutesIsEmpty
    Test code or tested code did not (only) close its own output buffers
  7. CodeIgniter\CodeIgniterTest::testTransfersCorrectHTTPVersion
    Test code or tested code did not (only) close its own output buffers
  8. FeatureTestCaseTest::testCallGet
    Test code or tested code did not (only) close its own output buffers
@jim-parry jim-parry added bug Verified issues on the current code behavior or pull requests that will fix them testing Pull requests that changes tests only labels Sep 21, 2018
@jim-parry jim-parry added this to the 4.0.0-alpha milestone Sep 21, 2018
@puschie286
Copy link
Contributor

the source of all this is the CodeIgniter::tryToRouteIt where ob_start opens a new buffer but it doesnt close.

workaround : use tearDown to clear open buffers #1242

@jim-parry
Copy link
Contributor Author

Fixed by #1242

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them testing Pull requests that changes tests only
Projects
None yet
Development

No branches or pull requests

2 participants