1 | <?php |
||
29 | class Moka |
||
30 | { |
||
31 | /** |
||
32 | * @var array|MockingStrategyInterface[] |
||
33 | */ |
||
34 | private static $mockingStrategies = []; |
||
35 | |||
36 | /** |
||
37 | * @param string $name |
||
38 | * @param array $arguments |
||
39 | * @return ProxyInterface |
||
40 | * |
||
41 | * @throws NotImplementedException |
||
42 | * @throws InvalidIdentifierException |
||
43 | * @throws MockNotCreatedException |
||
44 | * @throws MissingDependencyException |
||
45 | */ |
||
46 | 2 | public static function __callStatic(string $name, array $arguments): ProxyInterface |
|
50 | |||
51 | /** |
||
52 | * @param string $fqcnOrAlias |
||
53 | * @param string|null $alias |
||
54 | * @return MockObject|ProxyInterface |
||
55 | * |
||
56 | * @throws NotImplementedException |
||
57 | * @throws InvalidIdentifierException |
||
58 | * @throws MockNotCreatedException |
||
59 | * @throws MissingDependencyException |
||
60 | */ |
||
61 | 3 | public static function phpunit(string $fqcnOrAlias, string $alias = null): ProxyInterface |
|
72 | |||
73 | /** |
||
74 | * @param string $fqcnOrAlias |
||
75 | * @param string|null $alias |
||
76 | * @return ObjectProphecy|ProxyInterface |
||
77 | * |
||
78 | * @throws \ReflectionException |
||
79 | * @throws NotImplementedException |
||
80 | * @throws InvalidIdentifierException |
||
81 | * @throws MockNotCreatedException |
||
82 | * @throws MissingDependencyException |
||
83 | */ |
||
84 | 2 | public static function prophecy(string $fqcnOrAlias, string $alias = null): ProxyInterface |
|
116 | |||
117 | /** |
||
118 | * @return void |
||
119 | */ |
||
120 | 1 | public static function clean() |
|
124 | |||
125 | /** |
||
126 | * @return TestCase|null |
||
127 | */ |
||
128 | 4 | private static function getCurrentTestCase() |
|
150 | |||
151 | /** |
||
152 | * @param string $name |
||
153 | * @param array $arguments |
||
154 | * @return ProxyInterface |
||
155 | * |
||
156 | * @throws NotImplementedException |
||
157 | * @throws InvalidIdentifierException |
||
158 | * @throws MockNotCreatedException |
||
159 | * @throws MissingDependencyException |
||
160 | */ |
||
161 | 5 | private static function getProxy(string $name, array $arguments): ProxyInterface |
|
171 | |||
172 | /** |
||
173 | * @param string $pluginName |
||
174 | * @throws MissingDependencyException |
||
175 | * @throws NotImplementedException |
||
176 | */ |
||
177 | 5 | private static function ensurePluginLoad(string $pluginName): void |
|
183 | } |
||
184 |