Fix bug in style changes for the Use cases on the live site.
[yaffs-website] / vendor / phpunit / phpunit / src / Util / TestDox / ResultPrinter / Text.php
1 <?php
2 /*
3  * This file is part of PHPUnit.
4  *
5  * (c) Sebastian Bergmann <sebastian@phpunit.de>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 /**
12  * Prints TestDox documentation in text format.
13  *
14  * @since Class available since Release 2.1.0
15  */
16 class PHPUnit_Util_TestDox_ResultPrinter_Text extends PHPUnit_Util_TestDox_ResultPrinter
17 {
18     /**
19      * Handler for 'start class' event.
20      *
21      * @param string $name
22      */
23     protected function startClass($name)
24     {
25         $this->write($this->currentTestClassPrettified . "\n");
26     }
27
28     /**
29      * Handler for 'on test' event.
30      *
31      * @param string $name
32      * @param bool   $success
33      */
34     protected function onTest($name, $success = true)
35     {
36         if ($success) {
37             $this->write(' [x] ');
38         } else {
39             $this->write(' [ ] ');
40         }
41
42         $this->write($name . "\n");
43     }
44
45     /**
46      * Handler for 'end class' event.
47      *
48      * @param string $name
49      */
50     protected function endClass($name)
51     {
52         $this->write("\n");
53     }
54 }