aboutsummaryrefslogtreecommitdiffstats
path: root/tests/parser/PhpunitTestRecorder.php
blob: 996c2ba8def02dd833aee97abe1910eb9dbcf91f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php

use PHPUnit\Framework\TestCase;
use Wikimedia\Parsoid\ParserTests\Test as ParserTest;
use Wikimedia\Parsoid\ParserTests\TestMode as ParserTestMode;

class PhpunitTestRecorder extends TestRecorder {
	/** @var TestCase */
	private $testCase;

	public function setTestCase( TestCase $testCase ) {
		$this->testCase = $testCase;
	}

	/**
	 * Mark a test skipped
	 * @param ParserTest $test
	 * @param ParserTestMode $mode
	 * @param string $reason
	 */
	public function skipped( ParserTest $test, ParserTestMode $mode, string $reason ) {
		$this->testCase->markTestSkipped( "SKIPPED: $reason" );
	}
}