- Timestamp:
- 09/29/08 09:59:56 (3 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/felix-testing-implementation/src/testing/AgaviViewTestCase.class.php
r2958 r2959 111 111 } 112 112 113 /** 114 * assert that the response contains a redirect 115 * 116 * @param string the message to emit on failure 117 * 118 * @author Felix Gilcher <felix.gilcher@bitextender.com> 119 * @since 1.0.0 120 */ 113 121 protected function assertResponseHasRedirect($message = 'Failed asserting that the view redirects') 114 122 { … … 121 129 } 122 130 131 /** 132 * assert that the response contains no redirect 133 * 134 * @param string the message to emit on failure 135 * 136 * @author Felix Gilcher <felix.gilcher@bitextender.com> 137 * @since 1.0.0 138 */ 123 139 protected function assertResponseHasNoRedirect($message = 'Failed asserting that the view does not redirect') 124 140 { … … 131 147 } 132 148 149 /** 150 * assert that the response contains the expected redirect 151 * 152 * @param mixed the expected redirect 153 * @param string the message to emit on failure 154 * 155 * @author Felix Gilcher <felix.gilcher@bitextender.com> 156 * @since 1.0.0 157 */ 133 158 protected function assertResponseRedirectsTo($expected, $message = 'Failed asserting that the view redirects to the given target.') 134 159 { … … 141 166 } 142 167 168 /** 169 * assert that the response has the given content type 170 * 171 * this assertion only works on AgaviWebResponse or subclasses 172 * 173 * @param string the expected content type 174 * @param string the message to emit on failure 175 * 176 * @author Felix Gilcher <felix.gilcher@bitextender.com> 177 * @since 1.0.0 178 */ 143 179 protected function assertResponseHasContentType($expected, $message = 'Failed asserting that the response content type is %1$s.') 144 180 { … … 151 187 } 152 188 189 /** 190 * assert that the response has the given header and value 191 * 192 * this response only works on AgaviWebResponse and subclasses 193 * 194 * @param string the name of the expected header 195 * @param string the value of the expected header 196 * @param string the message to emit on failure 197 * 198 * @author Felix Gilcher <felix.gilcher@bitextender.com> 199 * @since 1.0.0 200 */ 153 201 protected function assertResponseHasHeader($expected, $expectedValue = null, $message = 'Failed asserting that the response has a header named <%1$s> with the value <%2$s>') 154 202 { … … 161 209 } 162 210 211 /** 212 * assert that the response has the given http status 213 * 214 * this assertion only works on AgaviWebResponse or subclasses 215 * 216 * @param string the expected http status 217 * @param string the message to emit on failure 218 * 219 * @author Felix Gilcher <felix.gilcher@bitextender.com> 220 * @since 1.0.0 221 */ 163 222 protected function assertResponseHasHTTPStatus($expected, $message = 'Failed asserting that the respons status is %1$s.') 164 223 { … … 171 230 } 172 231 232 /** 233 * assert that the response has the given content 234 * 235 * @param mixed the expected content 236 * @param string the message to emit on failure 237 * 238 * @author Felix Gilcher <felix.gilcher@bitextender.com> 239 * @since 1.0.0 240 */ 173 241 protected function assertResponseHasContent($expected, $message = 'Failed asserting that the response has content <%1$s>.') 174 242 { … … 177 245 } 178 246 247 /** 248 * assert that the view result has the given content 249 * 250 * @param mixed the expected content 251 * @param string the message to emit on failure 252 * 253 * @author Felix Gilcher <felix.gilcher@bitextender.com> 254 * @since 1.0.0 255 */ 179 256 protected function assertViewResultEquals($expected, $message = 'Failed asserting the expected view result.') 180 257 { … … 182 259 } 183 260 261 /** 262 * assert that the view forwards to the given module/action 263 * 264 * @param string the expected module name 265 * @param string the expected action name 266 * @param string the message to emit on failure 267 * 268 * @author Felix Gilcher <felix.gilcher@bitextender.com> 269 * @since 1.0.0 270 */ 184 271 protected function assertForwards($expectedModule, $expectedAction, $message = '') 185 272 { … … 190 277 } 191 278 279 /** 280 * assert that the view has the given layer 281 * 282 * @param string the expected layer name 283 * @param string the message to emit on failure 284 * 285 * @author Felix Gilcher <felix.gilcher@bitextender.com> 286 * @since 1.0.0 287 */ 192 288 protected function assertHasLayer($expectedLayer, $message = '') 193 289 {

