atoum/atoum — pull request #202 by jubianchi (2013-04-23 21:05:11+00:00)
Title: Add missing informations to TAP report

This PR adds missing informations to TAP report:
* PHP errors
* exceptions
* uncomplete methods
* atoum runtime exception

Here are some example outputs (generated with https://github.com/jubianchi/atoum-sample) :

```
1..9
not ok 1 - tests\unit\StdClass::testException()
# exception 'RuntimeException' with message 'This test triggered a \RuntimeException' in /Users/jubianchi/repositories/atoum/atoum-sample/tests/unit/StdClass.php:41
# Stack trace:
# #0 /Users/jubianchi/repositories/atoum/atoum-sample/vendor/atoum/atoum/classes/test.php(838): tests\unit\StdClass->testException()
# #1 -(1): mageekguy\atoum\test->runTestMethod('testException')
# #2 {main}
# /Users/jubianchi/repositories/atoum/atoum-sample/vendor/atoum/atoum/classes/test.php:838
not ok 2 # TODO tests\unit\StdClass::testVoid()
# /Users/jubianchi/repositories/atoum/atoum-sample/tests/unit/StdClass.php
ok 3
# tests\unit\StdClass::testPass()
not ok 4 - tests\unit\StdClass::testFail()
# object(stdClass) is not null
# /Users/jubianchi/repositories/atoum/atoum-sample/tests/unit/StdClass.php:19
ok 5 # SKIP tests\unit\StdClass::testSkipped()
# This test was skipped
not ok 6 - tests\unit\StdClass::testError()
# This test triggered an error
# /Users/jubianchi/repositories/atoum/atoum-sample/tests/unit/StdClass.php:36
ok 7
# tests\unit\atoum\sample\Foobar::test__construct()
not ok 8 - tests\unit\atoum\sample\Foobar::testIncomplete()
# I died
ok 9
# tests\unit\atoum\sample\Foobar::testGetFoo()

```

Here you can see how atoum's runtime exception are displayed in TAP report : in fact, they are displayed as "Bail out!" which, in TAP reports, means something went wrong and tests have been halted or are useless to run (http://podwiki.hexten.net/TAP/TAP.html?page=TAP#Bailout!):

```
1..10
ok 1 # SKIP tests\unit\StdClass::testSkipped()
# This test was skipped
not ok 2 - tests\unit\StdClass::testException()
# exception 'RuntimeException' with message 'This test triggered a \RuntimeException' in /Users/jubianchi/repositories/atoum/atoum-sample/tests/unit/StdClass.php:41
# Stack trace:
# #0 /Users/jubianchi/repositories/atoum/atoum-sample/vendor/atoum/atoum/classes/test.php(838): tests\unit\StdClass->testException()
# #1 -(1): mageekguy\atoum\test->runTestMethod('testException')
# #2 {main}
# /Users/jubianchi/repositories/atoum/atoum-sample/vendor/atoum/atoum/classes/test.php:838
ok 3
# tests\unit\StdClass::testPass()
not ok 4 - tests\unit\StdClass::testFail()
# object(stdClass) is not null
# /Users/jubianchi/repositories/atoum/atoum-sample/tests/unit/StdClass.php:19
not ok 5 # TODO tests\unit\StdClass::testVoid()
# /Users/jubianchi/repositories/atoum/atoum-sample/tests/unit/StdClass.php
not ok 6 - tests\unit\StdClass::testError()
# This test triggered an error
# /Users/jubianchi/repositories/atoum/atoum-sample/tests/unit/StdClass.php:36
Bail out! atoum runtime exception test

```