Total Complexity | 5 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | final class TestFailedException extends RuntimeException implements ExceptionInterface |
||
11 | { |
||
12 | |||
13 | private $index; |
||
14 | |||
15 | private $document; |
||
16 | |||
17 | private $path; |
||
18 | |||
19 | private $expectedValue; |
||
20 | |||
21 | 8 | public function __construct( |
|
22 | int $index, |
||
23 | NodeValueInterface $document, |
||
24 | string $path, |
||
25 | NodeValueInterface $expectedValue, |
||
26 | Throwable $previous = null |
||
27 | ) { |
||
28 | 8 | $this->index = $index; |
|
29 | 8 | $this->document = $document; |
|
30 | 8 | $this->path = $path; |
|
31 | 8 | $this->expectedValue = $expectedValue; |
|
32 | 8 | parent::__construct( |
|
33 | 8 | "Operation #{$this->index}: test operation failed at '{$path}'", |
|
34 | 8 | 0, |
|
35 | $previous |
||
36 | ); |
||
37 | 8 | } |
|
38 | |||
39 | 1 | public function getIndex(): int |
|
40 | { |
||
41 | 1 | return $this->index; |
|
42 | } |
||
43 | |||
44 | 1 | public function getDocument(): NodeValueInterface |
|
45 | { |
||
46 | 1 | return $this->document; |
|
47 | } |
||
48 | |||
49 | 1 | public function getPath(): string |
|
52 | } |
||
53 | |||
54 | 1 | public function getExpectedValue(): NodeValueInterface |
|
57 | } |
||
58 | } |
||
59 |