1 | <?php |
||
7 | class TestHelper { |
||
|
|||
8 | |||
9 | /** |
||
10 | * @param callable $callback |
||
11 | * @param string $expectedException |
||
12 | * @param int $expectedCode |
||
13 | * @param string $expectedMessage |
||
14 | * @author VladaHejda |
||
15 | */ |
||
16 | public static function assertException(callable $callback, $expectedException = 'Exception', $expectedCode = null, $expectedMessage = null) { |
||
50 | |||
51 | /** |
||
52 | * Call protected/private method of a class. |
||
53 | * |
||
54 | * @param object|string &$object Instantiated object that we will run method on. |
||
55 | * @param string $methodName Method name to call |
||
56 | * @param array $parameters Array of parameters to pass into method. |
||
57 | * |
||
58 | * @return mixed Method return. |
||
59 | * |
||
60 | * @author Juan Treminio |
||
61 | * @author Christian Blank |
||
62 | */ |
||
63 | public static function invoke(&$object, $methodName, array $parameters = []) { |
||
74 | } |
||
75 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.