| @@ 259-279 (lines=21) @@ | ||
| 256 | * |
|
| 257 | * @see \eZ\Publish\API\Repository\URLAliasService::createGlobalUrlAlias() |
|
| 258 | */ |
|
| 259 | public function testCreateGlobalUrlAlias() |
|
| 260 | { |
|
| 261 | $repository = $this->getRepository(); |
|
| 262 | ||
| 263 | /* BEGIN: Use Case */ |
|
| 264 | $urlAliasService = $repository->getURLAliasService(); |
|
| 265 | ||
| 266 | $createdUrlAlias = $urlAliasService->createGlobalUrlAlias( |
|
| 267 | 'module:content/search?SearchText=eZ', |
|
| 268 | '/Home/My-New-Site', |
|
| 269 | 'eng-US' |
|
| 270 | ); |
|
| 271 | /* END: Use Case */ |
|
| 272 | ||
| 273 | $this->assertInstanceOf( |
|
| 274 | 'eZ\\Publish\\API\\Repository\\Values\\Content\\URLAlias', |
|
| 275 | $createdUrlAlias |
|
| 276 | ); |
|
| 277 | ||
| 278 | return $createdUrlAlias; |
|
| 279 | } |
|
| 280 | ||
| 281 | /** |
|
| 282 | * @param \eZ\Publish\API\Repository\Values\Content\URLAlias |
|
| @@ 310-331 (lines=22) @@ | ||
| 307 | * |
|
| 308 | * @see \eZ\Publish\API\Repository\URLAliasService::createGlobalUrlAlias($resource, $path, $languageCode, $forward) |
|
| 309 | */ |
|
| 310 | public function testCreateGlobalUrlAliasWithForward() |
|
| 311 | { |
|
| 312 | $repository = $this->getRepository(); |
|
| 313 | ||
| 314 | /* BEGIN: Use Case */ |
|
| 315 | $urlAliasService = $repository->getURLAliasService(); |
|
| 316 | ||
| 317 | $createdUrlAlias = $urlAliasService->createGlobalUrlAlias( |
|
| 318 | 'module:content/search?SearchText=eZ', |
|
| 319 | '/Home/My-New-Site', |
|
| 320 | 'eng-US', |
|
| 321 | true |
|
| 322 | ); |
|
| 323 | /* END: Use Case */ |
|
| 324 | ||
| 325 | $this->assertInstanceOf( |
|
| 326 | 'eZ\\Publish\\API\\Repository\\Values\\Content\\URLAlias', |
|
| 327 | $createdUrlAlias |
|
| 328 | ); |
|
| 329 | ||
| 330 | return $createdUrlAlias; |
|
| 331 | } |
|
| 332 | ||
| 333 | /** |
|
| 334 | * @param \eZ\Publish\API\Repository\Values\Content\URLAlias |
|
| @@ 362-384 (lines=23) @@ | ||
| 359 | * |
|
| 360 | * @see \eZ\Publish\API\Repository\URLAliasService::createGlobalUrlAlias($resource, $path, $languageCode, $forwarding, $alwaysAvailable) |
|
| 361 | */ |
|
| 362 | public function testCreateGlobalUrlAliasWithAlwaysAvailable() |
|
| 363 | { |
|
| 364 | $repository = $this->getRepository(); |
|
| 365 | ||
| 366 | /* BEGIN: Use Case */ |
|
| 367 | $urlAliasService = $repository->getURLAliasService(); |
|
| 368 | ||
| 369 | $createdUrlAlias = $urlAliasService->createGlobalUrlAlias( |
|
| 370 | 'module:content/search?SearchText=eZ', |
|
| 371 | '/Home/My-New-Site', |
|
| 372 | 'eng-US', |
|
| 373 | false, |
|
| 374 | true |
|
| 375 | ); |
|
| 376 | /* END: Use Case */ |
|
| 377 | ||
| 378 | $this->assertInstanceOf( |
|
| 379 | 'eZ\\Publish\\API\\Repository\\Values\\Content\\URLAlias', |
|
| 380 | $createdUrlAlias |
|
| 381 | ); |
|
| 382 | ||
| 383 | return $createdUrlAlias; |
|
| 384 | } |
|
| 385 | ||
| 386 | /** |
|
| 387 | * @param \eZ\Publish\API\Repository\Values\Content\URLAlias |
|