|
@@ 93-102 (lines=10) @@
|
| 90 |
|
} |
| 91 |
|
} |
| 92 |
|
|
| 93 |
|
public function testResolveCurrentPage() |
| 94 |
|
{ |
| 95 |
|
$this->parameterResolver |
| 96 |
|
->expects($this->once()) |
| 97 |
|
->method('resolveCurrentPage') |
| 98 |
|
->will($this->returnValue($currentPage = 2)); |
| 99 |
|
|
| 100 |
|
$this->assertSame($currentPage, $this->cachedParameterResolver->resolveCurrentPage()); |
| 101 |
|
$this->assertSame($currentPage, $this->cachedParameterResolver->resolveCurrentPage()); |
| 102 |
|
} |
| 103 |
|
|
| 104 |
|
public function testResolveForm() |
| 105 |
|
{ |
|
@@ 139-148 (lines=10) @@
|
| 136 |
|
$this->assertTrue($this->cachedParameterResolver->resolveHateoas()); |
| 137 |
|
} |
| 138 |
|
|
| 139 |
|
public function testResolveLocationRoute() |
| 140 |
|
{ |
| 141 |
|
$this->parameterResolver |
| 142 |
|
->expects($this->once()) |
| 143 |
|
->method('resolveLocationRoute') |
| 144 |
|
->will($this->returnValue($locationRoute = 'location_route')); |
| 145 |
|
|
| 146 |
|
$this->assertSame($locationRoute, $this->cachedParameterResolver->resolveLocationRoute()); |
| 147 |
|
$this->assertSame($locationRoute, $this->cachedParameterResolver->resolveLocationRoute()); |
| 148 |
|
} |
| 149 |
|
|
| 150 |
|
public function testResolveLocationRouteParameters() |
| 151 |
|
{ |
|
@@ 169-178 (lines=10) @@
|
| 166 |
|
); |
| 167 |
|
} |
| 168 |
|
|
| 169 |
|
public function testResolveMaxPerPage() |
| 170 |
|
{ |
| 171 |
|
$this->parameterResolver |
| 172 |
|
->expects($this->once()) |
| 173 |
|
->method('resolveMaxPerPage') |
| 174 |
|
->will($this->returnValue($maxPerPage = 5)); |
| 175 |
|
|
| 176 |
|
$this->assertSame($maxPerPage, $this->cachedParameterResolver->resolveMaxPerPage()); |
| 177 |
|
$this->assertSame($maxPerPage, $this->cachedParameterResolver->resolveMaxPerPage()); |
| 178 |
|
} |
| 179 |
|
|
| 180 |
|
public function testResolveRedirectRoute() |
| 181 |
|
{ |
|
@@ 180-189 (lines=10) @@
|
| 177 |
|
$this->assertSame($maxPerPage, $this->cachedParameterResolver->resolveMaxPerPage()); |
| 178 |
|
} |
| 179 |
|
|
| 180 |
|
public function testResolveRedirectRoute() |
| 181 |
|
{ |
| 182 |
|
$this->parameterResolver |
| 183 |
|
->expects($this->once()) |
| 184 |
|
->method('resolveRedirectRoute') |
| 185 |
|
->will($this->returnValue($redirectRoute = 'redirect_route')); |
| 186 |
|
|
| 187 |
|
$this->assertSame($redirectRoute, $this->cachedParameterResolver->resolveRedirectRoute()); |
| 188 |
|
$this->assertSame($redirectRoute, $this->cachedParameterResolver->resolveRedirectRoute()); |
| 189 |
|
} |
| 190 |
|
|
| 191 |
|
public function testResolveRedirectRouteParameters() |
| 192 |
|
{ |
|
@@ 236-245 (lines=10) @@
|
| 233 |
|
$this->assertSame($repositoryMethod, $this->cachedParameterResolver->resolveRepositoryMethod($action)); |
| 234 |
|
} |
| 235 |
|
|
| 236 |
|
public function testResolveSerializerGroups() |
| 237 |
|
{ |
| 238 |
|
$this->parameterResolver |
| 239 |
|
->expects($this->once()) |
| 240 |
|
->method('resolveSerializerGroups') |
| 241 |
|
->will($this->returnValue($groups = ['group'])); |
| 242 |
|
|
| 243 |
|
$this->assertSame($groups, $this->cachedParameterResolver->resolveSerializerGroups()); |
| 244 |
|
$this->assertSame($groups, $this->cachedParameterResolver->resolveSerializerGroups()); |
| 245 |
|
} |
| 246 |
|
|
| 247 |
|
public function testResolveSerializerNull() |
| 248 |
|
{ |
|
@@ 258-267 (lines=10) @@
|
| 255 |
|
$this->assertTrue($this->cachedParameterResolver->resolveSerializerNull()); |
| 256 |
|
} |
| 257 |
|
|
| 258 |
|
public function testResolveSorting() |
| 259 |
|
{ |
| 260 |
|
$this->parameterResolver |
| 261 |
|
->expects($this->once()) |
| 262 |
|
->method('resolveSorting') |
| 263 |
|
->will($this->returnValue($sorting = ['sorting'])); |
| 264 |
|
|
| 265 |
|
$this->assertSame($sorting, $this->cachedParameterResolver->resolveSorting()); |
| 266 |
|
$this->assertSame($sorting, $this->cachedParameterResolver->resolveSorting()); |
| 267 |
|
} |
| 268 |
|
|
| 269 |
|
public function testResolveStatusCode() |
| 270 |
|
{ |
|
@@ 269-278 (lines=10) @@
|
| 266 |
|
$this->assertSame($sorting, $this->cachedParameterResolver->resolveSorting()); |
| 267 |
|
} |
| 268 |
|
|
| 269 |
|
public function testResolveStatusCode() |
| 270 |
|
{ |
| 271 |
|
$this->parameterResolver |
| 272 |
|
->expects($this->once()) |
| 273 |
|
->method('resolveStatusCode') |
| 274 |
|
->will($this->returnValue($statusCode = 200)); |
| 275 |
|
|
| 276 |
|
$this->assertSame($statusCode, $this->cachedParameterResolver->resolveStatusCode($statusCode)); |
| 277 |
|
$this->assertSame($statusCode, $this->cachedParameterResolver->resolveStatusCode($statusCode)); |
| 278 |
|
} |
| 279 |
|
|
| 280 |
|
public function testResolveTemplate() |
| 281 |
|
{ |
|
@@ 280-289 (lines=10) @@
|
| 277 |
|
$this->assertSame($statusCode, $this->cachedParameterResolver->resolveStatusCode($statusCode)); |
| 278 |
|
} |
| 279 |
|
|
| 280 |
|
public function testResolveTemplate() |
| 281 |
|
{ |
| 282 |
|
$this->parameterResolver |
| 283 |
|
->expects($this->once()) |
| 284 |
|
->method('resolveTemplate') |
| 285 |
|
->will($this->returnValue($template = 'template')); |
| 286 |
|
|
| 287 |
|
$this->assertSame($template, $this->cachedParameterResolver->resolveTemplate()); |
| 288 |
|
$this->assertSame($template, $this->cachedParameterResolver->resolveTemplate()); |
| 289 |
|
} |
| 290 |
|
|
| 291 |
|
public function testResolveThemes() |
| 292 |
|
{ |
|
@@ 291-300 (lines=10) @@
|
| 288 |
|
$this->assertSame($template, $this->cachedParameterResolver->resolveTemplate()); |
| 289 |
|
} |
| 290 |
|
|
| 291 |
|
public function testResolveThemes() |
| 292 |
|
{ |
| 293 |
|
$this->parameterResolver |
| 294 |
|
->expects($this->once()) |
| 295 |
|
->method('resolveThemes') |
| 296 |
|
->will($this->returnValue($themes = ['theme'])); |
| 297 |
|
|
| 298 |
|
$this->assertSame($themes, $this->cachedParameterResolver->resolveThemes()); |
| 299 |
|
$this->assertSame($themes, $this->cachedParameterResolver->resolveThemes()); |
| 300 |
|
} |
| 301 |
|
|
| 302 |
|
public function testResolveTranslationDomain() |
| 303 |
|
{ |
|
@@ 302-311 (lines=10) @@
|
| 299 |
|
$this->assertSame($themes, $this->cachedParameterResolver->resolveThemes()); |
| 300 |
|
} |
| 301 |
|
|
| 302 |
|
public function testResolveTranslationDomain() |
| 303 |
|
{ |
| 304 |
|
$this->parameterResolver |
| 305 |
|
->expects($this->once()) |
| 306 |
|
->method('resolveTranslationDomain') |
| 307 |
|
->will($this->returnValue($translationDomain = 'translation_domain')); |
| 308 |
|
|
| 309 |
|
$this->assertSame($translationDomain, $this->cachedParameterResolver->resolveTranslationDomain()); |
| 310 |
|
$this->assertSame($translationDomain, $this->cachedParameterResolver->resolveTranslationDomain()); |
| 311 |
|
} |
| 312 |
|
|
| 313 |
|
public function testResolveValidationGroups() |
| 314 |
|
{ |
|
@@ 313-322 (lines=10) @@
|
| 310 |
|
$this->assertSame($translationDomain, $this->cachedParameterResolver->resolveTranslationDomain()); |
| 311 |
|
} |
| 312 |
|
|
| 313 |
|
public function testResolveValidationGroups() |
| 314 |
|
{ |
| 315 |
|
$this->parameterResolver |
| 316 |
|
->expects($this->once()) |
| 317 |
|
->method('resolveValidationGroups') |
| 318 |
|
->will($this->returnValue($groups = ['group'])); |
| 319 |
|
|
| 320 |
|
$this->assertSame($groups, $this->cachedParameterResolver->resolveValidationGroups()); |
| 321 |
|
$this->assertSame($groups, $this->cachedParameterResolver->resolveValidationGroups()); |
| 322 |
|
} |
| 323 |
|
|
| 324 |
|
public function testResolveVoter() |
| 325 |
|
{ |