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