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

Risky test messages mask failures #1437

Closed
markstory opened this issue Sep 17, 2014 · 2 comments
Closed

Risky test messages mask failures #1437

markstory opened this issue Sep 17, 2014 · 2 comments
Assignees
Labels
type/bug Something is broken
Milestone

Comments

@markstory
Copy link
Contributor

I ran into a situation where I feel that PHPUnit should have marked a test case as failed, but instead marked it as OK.

<?php
class RiskyTest extends PHPUnit_Framework_TestCase {

    public function testFailure() {
        ob_start();
        $this->assertTrue(false);
    }

}

Using phpunit 4.2.2, I ran:

php phpunit.phar RiskyTest
PHPUnit 4.2.2 by Sebastian Bergmann.

R

Time: 22 ms, Memory: 2.50Mb

OK, but incomplete, skipped, or risky tests!
Tests: 1, Assertions: 1, Risky: 1.

I would have expected such a test case to fail.

@whatthejeff whatthejeff added the type/bug Something is broken label Sep 17, 2014
@whatthejeff whatthejeff added this to the PHPUnit 4.3 milestone Sep 17, 2014
@whatthejeff whatthejeff self-assigned this Sep 17, 2014
@whatthejeff
Copy link
Contributor

Thanks, @markstory. This should be fixed in the next stable release.

@markstory
Copy link
Contributor Author

Thanks @whatthejeff 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something is broken
Projects
None yet
Development

No branches or pull requests

2 participants