Codeception / Specify

BDD style code blocks for PHPUnit / Codeception
MIT License
156 stars 22 forks source link

Show test specification text when it fails #44

Closed krukru closed 6 years ago

krukru commented 6 years ago

One thing that is missing for me is the feature to write the specification name in the console when the test fails. This way when the test fails I have a nice descriptive name of the specification that failed.

For example I have this test

    public function testFoo(): void
    {
        $this->specify('Should fail and display this text in the console', function () {
            $this->assertTrue(false);
        });
    }

Is this possible to have?

krukru commented 6 years ago

Nevermind, I see that you get exactly that. My issue was that a test was throwing an uncatched exception, and this prevented the output from being displayed.