1 | <?php |
||
9 | class Match |
||
10 | { |
||
11 | /** |
||
12 | * @var bool |
||
13 | */ |
||
14 | protected $match; |
||
15 | |||
16 | /** |
||
17 | * @var mixed |
||
18 | */ |
||
19 | protected $expected; |
||
20 | |||
21 | /** |
||
22 | * @var mixed |
||
23 | */ |
||
24 | protected $actual; |
||
25 | |||
26 | /** |
||
27 | * @var bool |
||
28 | */ |
||
29 | protected $isNegated; |
||
30 | |||
31 | /** |
||
32 | * @param bool $isMatch |
||
33 | * @param mixed $expected |
||
34 | * @param mixed $actual |
||
35 | * @param bool $isNegated |
||
36 | */ |
||
37 | public function __construct($isMatch, $expected, $actual, $isNegated) |
||
44 | |||
45 | /** |
||
46 | * Return whether or not a match succeeded. |
||
47 | * |
||
48 | * @return bool |
||
49 | */ |
||
50 | public function isMatch() |
||
54 | |||
55 | /** |
||
56 | * Get the actual value used in the match. |
||
57 | * |
||
58 | * @return mixed |
||
59 | */ |
||
60 | public function getActual() |
||
64 | |||
65 | /** |
||
66 | * Get the expected value used in the match. |
||
67 | * |
||
68 | * @return mixed |
||
69 | */ |
||
70 | public function getExpected() |
||
74 | |||
75 | /** |
||
76 | * Returns whether or not the match was negated. |
||
77 | * |
||
78 | * @return boolean |
||
79 | */ |
||
80 | public function isNegated() |
||
84 | |||
85 | /** |
||
86 | * Set the actual value used in the match. |
||
87 | * |
||
88 | * @param mixed $actual |
||
89 | * @return $this |
||
90 | */ |
||
91 | public function setActual($actual) |
||
96 | |||
97 | /** |
||
98 | * Set the expected value used in the match. |
||
99 | * |
||
100 | * @param mixed $expected |
||
101 | * @return $this |
||
102 | */ |
||
103 | public function setExpected($expected) |
||
108 | } |
||
109 |