@@ 121-129 (lines=9) @@ | ||
118 | $this->isSatisfiedBy($playerC)->shouldBe(false); |
|
119 | } |
|
120 | ||
121 | public function it_is_satisfied_in_context_with_array(): void |
|
122 | { |
|
123 | $game = ['name' => 'Tetris']; |
|
124 | $player = ['pseudo' => 'Moe', 'gender' => 'M', 'points' => 1230, 'inGame' => $game]; |
|
125 | ||
126 | $this->beConstructedWith('releaseAt', 'inGame'); |
|
127 | ||
128 | $this->isSatisfiedBy($player)->shouldBe(true); |
|
129 | } |
|
130 | ||
131 | public function it_is_satisfied_in_context_with_object(): void |
|
132 | { |
@@ 134-146 (lines=13) @@ | ||
131 | $this->shouldThrow(NoSuchIndexException::class)->duringExecute($player, null); |
|
132 | } |
|
133 | ||
134 | public function it_is_executable_collection(): void |
|
135 | { |
|
136 | $this->beConstructedWith('pseudo', 'players'); |
|
137 | ||
138 | $game = [ |
|
139 | 'name' => 'Tetris', |
|
140 | 'players' => [ |
|
141 | ['pseudo' => 'Moe', 'gender' => 'M', 'points' => 1230], |
|
142 | ], |
|
143 | ]; |
|
144 | ||
145 | $this->execute($game, null)->shouldReturn(null); |
|
146 | } |
|
147 | } |
|
148 |