1 | <?php |
||
17 | class ContentFieldValidationExceptionTest extends ExceptionTest |
||
18 | { |
||
19 | /** |
||
20 | * Test the ContentFieldValidationException visitor. |
||
21 | * |
||
22 | * @return string |
||
23 | */ |
||
24 | public function testVisit() |
||
45 | |||
46 | /** |
||
47 | * Test if result contains ErrorMessage element and description. |
||
48 | * |
||
49 | * @param string $result |
||
50 | * |
||
51 | * @depends testVisit |
||
52 | */ |
||
53 | public function testResultContainsErrorDescription($result) |
||
64 | |||
65 | /** |
||
66 | * Test if result contains ErrorMessage element and details. |
||
67 | * |
||
68 | * @param string $result |
||
69 | * |
||
70 | * @depends testVisit |
||
71 | */ |
||
72 | public function testResultContainsErrorDetails($result) |
||
90 | |||
91 | /** |
||
92 | * Get expected status code. |
||
93 | * |
||
94 | * @return int |
||
95 | */ |
||
96 | protected function getExpectedStatusCode() |
||
100 | |||
101 | /** |
||
102 | * Get expected message. |
||
103 | * |
||
104 | * @return string |
||
105 | */ |
||
106 | protected function getExpectedMessage() |
||
110 | |||
111 | /** |
||
112 | * Get expected description. |
||
113 | * |
||
114 | * @return string |
||
115 | */ |
||
116 | protected function getExpectedDescription() |
||
120 | |||
121 | /** |
||
122 | * Gets the exception. |
||
123 | * |
||
124 | * @return \Exception |
||
125 | */ |
||
126 | protected function getException() |
||
149 | |||
150 | /** |
||
151 | * Gets the exception visitor. |
||
152 | * |
||
153 | * @return \eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\ContentFieldValidationException |
||
154 | */ |
||
155 | protected function internalGetVisitor() |
||
159 | } |
||
160 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.