1 | <?php |
||
30 | class Moka |
||
31 | { |
||
32 | /** |
||
33 | * @var array|MockingStrategyInterface[] |
||
34 | */ |
||
35 | private static $mockingStrategies = []; |
||
36 | |||
37 | /** |
||
38 | * @param string $name |
||
39 | * @param array $arguments |
||
40 | * @return ProxyInterface |
||
41 | * |
||
42 | * @throws NotImplementedException |
||
43 | * @throws InvalidIdentifierException |
||
44 | * @throws MockNotCreatedException |
||
45 | * @throws MissingDependencyException |
||
46 | */ |
||
47 | 1 | public static function __callStatic(string $name, array $arguments): ProxyInterface |
|
51 | |||
52 | /** |
||
53 | * @param string $fqcnOrAlias |
||
54 | * @param string|null $alias |
||
55 | * @return MockObject|ProxyInterface |
||
56 | * |
||
57 | * @throws NotImplementedException |
||
58 | * @throws InvalidIdentifierException |
||
59 | * @throws MockNotCreatedException |
||
60 | * @throws MissingDependencyException |
||
61 | * @throws InvalidArgumentException |
||
62 | */ |
||
63 | 3 | public static function phpunit(string $fqcnOrAlias, string $alias = null): ProxyInterface |
|
74 | |||
75 | /** |
||
76 | * @param string $fqcnOrAlias |
||
77 | * @param string|null $alias |
||
78 | * @return ObjectProphecy|ProxyInterface |
||
79 | * |
||
80 | * @throws \ReflectionException |
||
81 | * @throws NotImplementedException |
||
82 | * @throws InvalidIdentifierException |
||
83 | * @throws MockNotCreatedException |
||
84 | * @throws MissingDependencyException |
||
85 | */ |
||
86 | 2 | public static function prophecy(string $fqcnOrAlias, string $alias = null): ProxyInterface |
|
118 | |||
119 | /** |
||
120 | * @return void |
||
121 | */ |
||
122 | 1 | public static function clean(): void |
|
126 | |||
127 | /** |
||
128 | * @return TestCase|null |
||
129 | */ |
||
130 | 4 | private static function getCurrentTestCase(): ?TestCase |
|
152 | |||
153 | /** |
||
154 | * @param string $name |
||
155 | * @param array $arguments |
||
156 | * @return ProxyInterface |
||
157 | * |
||
158 | * @throws NotImplementedException |
||
159 | * @throws InvalidIdentifierException |
||
160 | * @throws MockNotCreatedException |
||
161 | * @throws MissingDependencyException |
||
162 | * @throws InvalidArgumentException |
||
163 | */ |
||
164 | 4 | private static function getProxy(string $name, array $arguments): ProxyInterface |
|
174 | |||
175 | /** |
||
176 | * @param string $pluginName |
||
177 | * @throws MissingDependencyException |
||
178 | * @throws NotImplementedException |
||
179 | */ |
||
180 | 4 | private static function ensurePluginLoad(string $pluginName): void |
|
186 | } |
||
187 |