Total Complexity | 6 |
Total Lines | 67 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class RpTestResult |
||
12 | { |
||
13 | /** @var RpTestInterface */ |
||
14 | private $test; |
||
15 | |||
16 | /** @var TestInfo */ |
||
17 | private $testInfo; |
||
18 | |||
19 | /** @var string */ |
||
20 | private $implementation; |
||
21 | |||
22 | /** @var Throwable */ |
||
23 | private $exception; |
||
24 | |||
25 | /** |
||
26 | * RpTestResult constructor. |
||
27 | * @param RpTestInterface $test |
||
28 | * @param TestInfo $testInfo |
||
29 | * @param string $implementation |
||
30 | * @param Throwable|null $exception |
||
31 | */ |
||
32 | public function __construct(RpTestInterface $test, TestInfo $testInfo, string $implementation, ?Throwable $exception = null) |
||
33 | { |
||
34 | $this->test = $test; |
||
35 | $this->testInfo = $testInfo; |
||
36 | $this->implementation = $implementation; |
||
37 | $this->exception = $exception; |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @return RpTestInterface |
||
42 | */ |
||
43 | public function getTest(): RpTestInterface |
||
44 | { |
||
45 | return $this->test; |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @return TestInfo |
||
50 | */ |
||
51 | public function getTestInfo(): TestInfo |
||
52 | { |
||
53 | return $this->testInfo; |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * @return string |
||
58 | */ |
||
59 | public function getImplementation(): string |
||
62 | } |
||
63 | |||
64 | /** |
||
65 | * @return null|Throwable |
||
66 | */ |
||
67 | public function getException(): ?Throwable |
||
70 | } |
||
71 | |||
72 | /** |
||
73 | * @param Throwable $exception |
||
74 | */ |
||
75 | public function setException(Throwable $exception): void |
||
80 |