/** * @param string $methodName * @param bool $moreThanOnce */ public function addRequiredMethod($methodName, $moreThanOnce = false) { if ($moreThanOnce) { $this->mock->expects($this->testCase->atLeastOnce())->method($methodName)->with(); } else { $this->mock->expects($this->testCase->once())->method($methodName)->with(); } }