Version 1
[yaffs-website] / vendor / phpunit / phpunit / src / Framework / SkippedTestCase.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  * A skipped test case
13  *
14  * @since Class available since Release 4.3.0
15  */
16 class PHPUnit_Framework_SkippedTestCase 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 $message
50      */
51     public function __construct($className, $methodName, $message = '')
52     {
53         $this->message = $message;
54         parent::__construct($className . '::' . $methodName);
55     }
56
57     /**
58      * @throws PHPUnit_Framework_Exception
59      */
60     protected function runTest()
61     {
62         $this->markTestSkipped($this->message);
63     }
64
65     /**
66      * @return string
67      */
68     public function getMessage()
69     {
70         return $this->message;
71     }
72
73     /**
74      * Returns a string representation of the test case.
75      *
76      * @return string
77      */
78     public function toString()
79     {
80         return $this->getName();
81     }
82 }