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