public function expects($invocationRestriction) { $current_expectation = new Expectation($this); $current_expectation->setInvocationRestriction($invocationRestriction); $this->expectations[] = $current_expectation; return $current_expectation; }