X7ROOT File Manager
Current Path:
/home/prisjneg/public_html/vendor/mockery/mockery/library/Mockery
home
/
prisjneg
/
public_html
/
vendor
/
mockery
/
mockery
/
library
/
Mockery
/
📁
..
📁
Adapter
📄
ClosureWrapper.php
(658 B)
📄
CompositeExpectation.php
(3.46 KB)
📄
Configuration.php
(10.39 KB)
📄
Container.php
(18.1 KB)
📁
CountValidator
📁
Exception
📄
Exception.php
(485 B)
📄
Expectation.php
(24.18 KB)
📄
ExpectationDirector.php
(5.54 KB)
📄
ExpectationInterface.php
(735 B)
📄
ExpectsHigherOrderMessage.php
(791 B)
📁
Generator
📄
HigherOrderMessage.php
(1.11 KB)
📄
Instantiator.php
(4.24 KB)
📄
LegacyMockInterface.php
(5.84 KB)
📁
Loader
📁
Matcher
📄
MethodCall.php
(862 B)
📄
Mock.php
(28.96 KB)
📄
MockInterface.php
(795 B)
📄
QuickDefinitionsConfiguration.php
(1.73 KB)
📄
ReceivedMethodCalls.php
(930 B)
📄
Reflector.php
(8.96 KB)
📄
Undefined.php
(816 B)
📄
VerificationDirector.php
(3.56 KB)
📄
VerificationExpectation.php
(602 B)
Editing: VerificationDirector.php
<?php /** * Mockery (https://docs.mockery.io/) * * @copyright https://github.com/mockery/mockery/blob/HEAD/COPYRIGHT.md * @license https://github.com/mockery/mockery/blob/HEAD/LICENSE BSD 3-Clause License * @link https://github.com/mockery/mockery for the canonical source repository */ namespace Mockery; class VerificationDirector { /** * @var VerificationExpectation */ private $expectation; /** * @var ReceivedMethodCalls */ private $receivedMethodCalls; public function __construct(ReceivedMethodCalls $receivedMethodCalls, VerificationExpectation $expectation) { $this->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; } }
Upload File
Create Folder