Version 1
[yaffs-website] / vendor / phpunit / phpunit / src / Framework / IncompleteTestCase.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  * An incomplete test case
13  *
14  * @since Class available since Release 4.3.0
15  */
16 class PHPUnit_Framework_IncompleteTestCase extends PHPUnit_Framework_TestCase
17 {
18     /**
19      * @var string
20      */
21     protected $message = '';
22
23     /**
24      * @var bool
25      */
26     protected $backupGlobals = false;
27
28     /**
29      * @var bool
30      */
31     protected $backupStaticAttributes = false;
32
33     /**
34      * @var bool
35      */
36     protected $runTestInSeparateProcess = false;
37
38     /**
39      * @var bool
40      */
41     protected $useErrorHandler = false;
42
43     /**
44      * @var bool
45      */
46     protected $useOutputBuffering = false;
47
48     /**
49      * @param string $className
50      * @param string $methodName
51      * @param string $message
52      */
53     public function __construct($className, $methodName, $message = '')
54     {
55         $this->message = $message;
56         parent::__construct($className . '::' . $methodName);
57     }
58
59     /**
60      * @throws PHPUnit_Framework_Exception
61      */
62     protected function runTest()
63     {
64         $this->markTestIncomplete($this->message);
65     }
66
67     /**
68      * @return string
69      */
70     public function getMessage()
71     {
72         return $this->message;
73     }
74
75     /**
76      * Returns a string representation of the test case.
77      *
78      * @return string
79      */
80     public function toString()
81     {
82         return $this->getName();
83     }
84 }