class MockMethodSet
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
@internal This class is not covered by the backward compatibility promise for PHPUnit
Hierarchy
- class \PHPUnit\Framework\MockObject\Generator\MockMethodSet
Expanded class hierarchy of MockMethodSet
File
-
vendor/
phpunit/ phpunit/ src/ Framework/ MockObject/ Generator/ MockMethodSet.php, line 21
Namespace
PHPUnit\Framework\MockObject\GeneratorView source
final class MockMethodSet {
/**
* @psalm-var array<string,MockMethod>
*/
private array $methods = [];
public function addMethods(MockMethod ...$methods) : void {
foreach ($methods as $method) {
$this->methods[strtolower($method->methodName())] = $method;
}
}
/**
* @psalm-return list<MockMethod>
*/
public function asArray() : array {
return array_values($this->methods);
}
public function hasMethod(string $methodName) : bool {
return array_key_exists(strtolower($methodName), $this->methods);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
MockMethodSet::$methods | private | property | @psalm-var array<string,MockMethod> |
MockMethodSet::addMethods | public | function | |
MockMethodSet::asArray | public | function | @psalm-return list<MockMethod> |
MockMethodSet::hasMethod | public | function |