Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| ConsensusVerdict | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Phpdftk\WptHarness; |
| 6 | |
| 7 | /** |
| 8 | * Verdict returned by {@see ConsensusScorer::score()} for a single test. |
| 9 | * |
| 10 | * The cross-browser oracle classifies fixtures along two axes: |
| 11 | * "did at least two browsers agree?" and "did we match that |
| 12 | * consensus?" — these four cases cover the combinations. |
| 13 | * |
| 14 | * - {@see self::Pass}: at least two browsers agreed and our render |
| 15 | * matches them within budget. The test is green. |
| 16 | * - {@see self::Fail}: at least two browsers agreed and our render |
| 17 | * diverges from them above budget. This is a real bug for us. |
| 18 | * - {@see self::SkipDisagree}: the browsers don't agree among |
| 19 | * themselves. We can't judge ours fairly — we're either right or |
| 20 | * wrong relative to a single engine, which doesn't tell us anything. |
| 21 | * The test is skipped, not failed. |
| 22 | * - {@see self::InsufficientEngines}: fewer than two browser renders |
| 23 | * supplied (e.g. WebKit missing on a Linux runner and only Chromium |
| 24 | * was rendered). No verdict possible. |
| 25 | */ |
| 26 | enum ConsensusVerdict: string |
| 27 | { |
| 28 | case Pass = 'pass'; |
| 29 | case Fail = 'fail'; |
| 30 | case SkipDisagree = 'skip_disagree'; |
| 31 | case InsufficientEngines = 'insufficient_engines'; |
| 32 | } |