/var/www/flurhymez/vendor/phpunit/phpunit/src/Framework/MockObject/Rule
NameSizeModeActions
AnyInvokedCount.php8360644editdlrm
AnyParameters.php7260644editdlrm
ConsecutiveParameters.php38020644editdlrm
InvocationOrder.php12260644editdlrm
InvokedAtIndex.php18880644editdlrm
InvokedAtLeastCount.php16970644editdlrm
InvokedAtLeastOnce.php13180644editdlrm
InvokedAtMostCount.php16860644editdlrm
InvokedCount.php26400644editdlrm
MethodName.php19250644editdlrm
Parameters.php46590644editdlrm
ParametersRule.php8650644editdlrm
Edit: /var/www/flurhymez/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/MethodName.php (1925B)
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Framework\MockObject\Rule; use function is_string; use PHPUnit\Framework\Constraint\Constraint; use PHPUnit\Framework\InvalidArgumentException; use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; use PHPUnit\Framework\MockObject\MethodNameConstraint; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class MethodName { /** * @var Constraint */ private $constraint; /** * @param Constraint|string $constraint * * @throws InvalidArgumentException */ public function __construct($constraint) { if (is_string($constraint)) { $constraint = new MethodNameConstraint($constraint); } if (!$constraint instanceof Constraint) { throw InvalidArgumentException::create(1, 'PHPUnit\Framework\Constraint\Constraint object or string'); } $this->constraint = $constraint; } public function toString(): string { return 'method name ' . $this->constraint->toString(); } /** * @throws \PHPUnit\Framework\ExpectationFailedException * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function matches(BaseInvocation $invocation): bool { return $this->matchesName($invocation->getMethodName()); } /** * @throws \PHPUnit\Framework\ExpectationFailedException * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function matchesName(string $methodName): bool { return (bool) $this->constraint->evaluate($methodName, '', true); } }