1 | <?php |
||
23 | abstract class ControllerTestUtility extends \PHPUnit_Framework_TestCase { |
||
24 | |||
25 | |||
26 | /** |
||
27 | * Checks if a controllermethod has the expected annotations |
||
28 | * @param Controller/string $controller name or instance of the controller |
||
|
|||
29 | * @param array $expected an array containing the expected annotations |
||
30 | * @param array $valid if you define your own annotations, pass them here |
||
31 | */ |
||
32 | protected function assertAnnotations($controller, $method, array $expected, |
||
53 | |||
54 | |||
55 | /** |
||
56 | * Shortcut for testing expected headers of a response |
||
57 | * @param array $expected an array with the expected headers |
||
58 | * @param Response $response the response which we want to test for headers |
||
59 | */ |
||
60 | protected function assertHeaders(array $expected=array(), Response $response){ |
||
66 | |||
67 | |||
68 | /** |
||
69 | * Instead of using positional parameters this function instantiates |
||
70 | * a request by using a hashmap so its easier to only set specific params |
||
71 | * @param array $params a hashmap with the parameters for request |
||
72 | * @return Request a request instance |
||
73 | */ |
||
74 | protected function getRequest(array $params=array()) { |
||
101 | |||
102 | } |
||
103 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.