Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
50.00% |
1 / 2 |
CRAP | |
18.18% |
2 / 11 |
ReceivedMethodCalls | |
0.00% |
0 / 1 |
|
50.00% |
1 / 2 |
18.69 | |
18.18% |
2 / 11 |
push | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
verify | |
0.00% |
0 / 1 |
20 | |
0.00% |
0 / 9 |
<?php | |
namespace Mockery; | |
class ReceivedMethodCalls | |
{ | |
private $methodCalls = array(); | |
public function push(MethodCall $methodCall) | |
{ | |
$this->methodCalls[] = $methodCall; | |
} | |
public function verify(Expectation $expectation) | |
{ | |
foreach ($this->methodCalls as $methodCall) { | |
if ($methodCall->getMethod() !== $expectation->getName()) { | |
continue; | |
} | |
if (!$expectation->matchArgs($methodCall->getArgs())) { | |
continue; | |
} | |
$expectation->verifyCall($methodCall->getArgs()); | |
} | |
$expectation->verify(); | |
} | |
} |