| @@ 267-287 (lines=21) @@ | ||
| 264 | * |
|
| 265 | * @see \eZ\Publish\API\Repository\URLAliasService::createGlobalUrlAlias() |
|
| 266 | */ |
|
| 267 | public function testCreateGlobalUrlAlias() |
|
| 268 | { |
|
| 269 | $repository = $this->getRepository(); |
|
| 270 | ||
| 271 | /* BEGIN: Use Case */ |
|
| 272 | $urlAliasService = $repository->getURLAliasService(); |
|
| 273 | ||
| 274 | $createdUrlAlias = $urlAliasService->createGlobalUrlAlias( |
|
| 275 | 'module:content/search?SearchText=eZ', |
|
| 276 | '/Home/My-New-Site', |
|
| 277 | 'eng-US' |
|
| 278 | ); |
|
| 279 | /* END: Use Case */ |
|
| 280 | ||
| 281 | $this->assertInstanceOf( |
|
| 282 | 'eZ\\Publish\\API\\Repository\\Values\\Content\\URLAlias', |
|
| 283 | $createdUrlAlias |
|
| 284 | ); |
|
| 285 | ||
| 286 | return $createdUrlAlias; |
|
| 287 | } |
|
| 288 | ||
| 289 | /** |
|
| 290 | * @param \eZ\Publish\API\Repository\Values\Content\URLAlias |
|
| @@ 318-339 (lines=22) @@ | ||
| 315 | * |
|
| 316 | * @see \eZ\Publish\API\Repository\URLAliasService::createGlobalUrlAlias($resource, $path, $languageCode, $forward) |
|
| 317 | */ |
|
| 318 | public function testCreateGlobalUrlAliasWithForward() |
|
| 319 | { |
|
| 320 | $repository = $this->getRepository(); |
|
| 321 | ||
| 322 | /* BEGIN: Use Case */ |
|
| 323 | $urlAliasService = $repository->getURLAliasService(); |
|
| 324 | ||
| 325 | $createdUrlAlias = $urlAliasService->createGlobalUrlAlias( |
|
| 326 | 'module:content/search?SearchText=eZ', |
|
| 327 | '/Home/My-New-Site', |
|
| 328 | 'eng-US', |
|
| 329 | true |
|
| 330 | ); |
|
| 331 | /* END: Use Case */ |
|
| 332 | ||
| 333 | $this->assertInstanceOf( |
|
| 334 | 'eZ\\Publish\\API\\Repository\\Values\\Content\\URLAlias', |
|
| 335 | $createdUrlAlias |
|
| 336 | ); |
|
| 337 | ||
| 338 | return $createdUrlAlias; |
|
| 339 | } |
|
| 340 | ||
| 341 | /** |
|
| 342 | * @param \eZ\Publish\API\Repository\Values\Content\URLAlias |
|
| @@ 370-392 (lines=23) @@ | ||
| 367 | * |
|
| 368 | * @see \eZ\Publish\API\Repository\URLAliasService::createGlobalUrlAlias($resource, $path, $languageCode, $forwarding, $alwaysAvailable) |
|
| 369 | */ |
|
| 370 | public function testCreateGlobalUrlAliasWithAlwaysAvailable() |
|
| 371 | { |
|
| 372 | $repository = $this->getRepository(); |
|
| 373 | ||
| 374 | /* BEGIN: Use Case */ |
|
| 375 | $urlAliasService = $repository->getURLAliasService(); |
|
| 376 | ||
| 377 | $createdUrlAlias = $urlAliasService->createGlobalUrlAlias( |
|
| 378 | 'module:content/search?SearchText=eZ', |
|
| 379 | '/Home/My-New-Site', |
|
| 380 | 'eng-US', |
|
| 381 | false, |
|
| 382 | true |
|
| 383 | ); |
|
| 384 | /* END: Use Case */ |
|
| 385 | ||
| 386 | $this->assertInstanceOf( |
|
| 387 | 'eZ\\Publish\\API\\Repository\\Values\\Content\\URLAlias', |
|
| 388 | $createdUrlAlias |
|
| 389 | ); |
|
| 390 | ||
| 391 | return $createdUrlAlias; |
|
| 392 | } |
|
| 393 | ||
| 394 | /** |
|
| 395 | * @param \eZ\Publish\API\Repository\Values\Content\URLAlias |
|