public rememberMock ( Mockery\MockInterface $mock ) : |
||
$mock | Mockery\MockInterface | |
return |
public function rememberMock(\Mockery\MockInterface $mock)
{
if (!isset($this->_mocks[get_class($mock)])) {
$this->_mocks[get_class($mock)] = $mock;
} else {
/**
* This condition triggers for an instance mock where origin mock
* is already remembered
*/
$this->_mocks[] = $mock;
}
return $mock;
}