芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/public_html/invoicer.pulsehost.co.uk/vendor/hamcrest/VerificationDirector.php
receivedMethodCalls = $receivedMethodCalls; $this->expectation = $expectation; } /** * @return self */ public function atLeast() { return $this->cloneWithoutCountValidatorsApplyAndVerify('atLeast', []); } /** * @return self */ public function atMost() { return $this->cloneWithoutCountValidatorsApplyAndVerify('atMost', []); } /** * @param int $minimum * @param int $maximum * * @return self */ public function between($minimum, $maximum) { return $this->cloneWithoutCountValidatorsApplyAndVerify('between', [$minimum, $maximum]); } /** * @return self */ public function once() { return $this->cloneWithoutCountValidatorsApplyAndVerify('once', []); } /** * @param int $limit * * @return self */ public function times($limit = null) { return $this->cloneWithoutCountValidatorsApplyAndVerify('times', [$limit]); } /** * @return self */ public function twice() { return $this->cloneWithoutCountValidatorsApplyAndVerify('twice', []); } public function verify() { $this->receivedMethodCalls->verify($this->expectation); } /** * @template TArgs * * @param TArgs $args * * @return self */ public function with(...$args) { return $this->cloneApplyAndVerify('with', $args); } /** * @return self */ public function withAnyArgs() { return $this->cloneApplyAndVerify('withAnyArgs', []); } /** * @template TArgs * * @param TArgs $args * * @return self */ public function withArgs($args) { return $this->cloneApplyAndVerify('withArgs', [$args]); } /** * @return self */ public function withNoArgs() { return $this->cloneApplyAndVerify('withNoArgs', []); } /** * @param string $method * @param array $args * * @return self */ protected function cloneApplyAndVerify($method, $args) { $verificationExpectation = clone $this->expectation; $verificationExpectation->{$method}(...$args); $verificationDirector = new self($this->receivedMethodCalls, $verificationExpectation); $verificationDirector->verify(); return $verificationDirector; } /** * @param string $method * @param array $args * * @return self */ protected function cloneWithoutCountValidatorsApplyAndVerify($method, $args) { $verificationExpectation = clone $this->expectation; $verificationExpectation->clearCountValidators(); $verificationExpectation->{$method}(...$args); $verificationDirector = new self($this->receivedMethodCalls, $verificationExpectation); $verificationDirector->verify(); return $verificationDirector; } }