3 class PHPT_Section_SKIPIF
implements PHPT_Section_RunnableBefore
7 public function __construct($data)
12 public function run(PHPT_Case
$case)
14 // @todo refactor this code into PHPT_Util class as its used in multiple places
15 $filename = dirname($case->filename
) . '/' . basename($case->filename
, '.php') . '.skip.php';
17 // @todo refactor to PHPT_CodeRunner
18 file_put_contents($filename, $this->_data
);
20 exec('php -f ' . $filename, $response);
21 $response = implode(PHP_EOL
, $response);
24 if (preg_match('/^skip( - (.*))?/', $response, $matches)) {
25 $message = !empty($matches[2]) ?
$matches[2] : '';
26 throw new PHPT_Case_VetoException($message);
30 public function getPriority()