mikeerickson / phpunit-pretty-result-printer

PHPUnit Pretty Result Printer -- make your PHPUnit tests look pretty!
MIT License
1.2k stars 71 forks source link

When the first test in a file fails, it is shown as a failure on the previous line #8

Closed kbond closed 6 years ago

kbond commented 6 years ago

I have two tests:

final class FirstFileTest extends \PHPUnit\Framework\TestCase
{
    public function test_first_test()
    {
        $this->assertTrue(true);
    }

    public function test_second_test()
    {
        $this->assertTrue(true);
    }
}

And:

final class SecondFileTest extends \PHPUnit\Framework\TestCase
{
    public function test_third_test()
    {
        $this->assertTrue(false); // failure
    }

    public function test_fourth_test()
    {
        $this->assertTrue(true);
    }
}

The output is as follows:

 ==> FirstFileTest                               ✓ ✓ ✖ 
 ==> SecondFileTest                              ✓ 
kbond commented 6 years ago

When I make test_first_test fail, the output is as follows:

✖ 
 ==> FirstFileTest                               ✓ ✖ 
 ==> SecondFileTest                              ✓
mikeerickson commented 6 years ago

@kbond I have been able to reproduce your issue, I will try and get this worked out over the weekend, but we are starting our holiday break today so not 100% sure

kbond commented 6 years ago

Great, no rush!

mikeerickson commented 6 years ago

If anybody would like to help this issue, it would be most welcome. If not, I plan on getting to this ni the next few days.

mikeerickson commented 6 years ago

Released 0.4.4