| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
o |
| 6 |
. |
| 7 |
|
| 8 |
use Wikimedia\Parsoid\ParserTests\Test as ParserTest; |
| 9 |
use Wikimedia\Parsoid\ParserTests\TestMode as ParserTestMode; |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
class ParserTestResult { |
| 17 |
|
| 18 |
public $test; |
| 19 |
|
| 20 |
public $mode; |
| 21 |
|
| 22 |
public $expected; |
| 23 |
|
| 24 |
public $actual; |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
public function __construct( $test, $mode, $expected, $actual ) { |
| 33 |
$this->test = $test; |
| 34 |
$this->mode = $mode; |
| 35 |
$this->expected = $expected; |
| 36 |
$this->actual = $actual; |
| 37 |
} |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
public function isSuccess() { |
| 44 |
return $this->expected === $this->actual; |
| 45 |
} |
| 46 |
|
| 47 |
public function getDescription() { |
| 48 |
return "{$this->test->testName} [{$this->mode}]"; |
| 49 |
} |
| 50 |
} |