| 1 | <?php |
||
| 5 | class CheckExpectations |
||
| 6 | { |
||
| 7 | private $chain; |
||
| 8 | |||
| 9 | private $phpunit; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * CheckExpectations constructor. |
||
| 13 | * |
||
| 14 | * @param $chain |
||
| 15 | * @param $phpunit |
||
| 16 | */ |
||
| 17 | 17 | public function __construct(Chain $chain, $phpunit) |
|
| 22 | |||
| 23 | 17 | public function check() |
|
| 29 | |||
| 30 | 17 | private function checkResponse() |
|
| 37 | |||
| 38 | /** |
||
| 39 | * @param $method |
||
| 40 | * @param $data |
||
| 41 | * |
||
| 42 | * @return mixed |
||
| 43 | */ |
||
| 44 | 12 | private function sendRequest($method, $data) |
|
| 48 | |||
| 49 | /** |
||
| 50 | * @param $response |
||
| 51 | */ |
||
| 52 | 12 | private function checkResponses($response) |
|
| 58 | |||
| 59 | 17 | private function fireEvents() |
|
| 60 | { |
||
| 61 | 17 | if (isset($this->chain->data['event'])) { |
|
| 62 | 1 | event($this->chain->data['event']); |
|
| 63 | } |
||
| 64 | 17 | } |
|
| 65 | |||
| 66 | 17 | private function expectExceptions() |
|
| 72 | } |
||
| 73 |
This check looks for function calls that miss required arguments.