| @@ 94-113 (lines=20) @@ | ||
| 91 | * |
|
| 92 | * @depends testCreateUrlAlias |
|
| 93 | */ |
|
| 94 | public function testCreateUrlAliasPropertyValues(array $testData) |
|
| 95 | { |
|
| 96 | list($createdUrlAlias, $locationId) = $testData; |
|
| 97 | ||
| 98 | $this->assertNotNull($createdUrlAlias->id); |
|
| 99 | ||
| 100 | $this->assertPropertiesCorrect( |
|
| 101 | array( |
|
| 102 | 'type' => URLAlias::LOCATION, |
|
| 103 | 'destination' => $locationId, |
|
| 104 | 'path' => '/Home/My-New-Site', |
|
| 105 | 'languageCodes' => array('eng-US'), |
|
| 106 | 'alwaysAvailable' => false, |
|
| 107 | 'isHistory' => false, |
|
| 108 | 'isCustom' => true, |
|
| 109 | 'forward' => false, |
|
| 110 | ), |
|
| 111 | $createdUrlAlias |
|
| 112 | ); |
|
| 113 | } |
|
| 114 | ||
| 115 | /** |
|
| 116 | * Test for the createUrlAlias() method. |
|
| @@ 151-170 (lines=20) @@ | ||
| 148 | * |
|
| 149 | * @depends testCreateUrlAliasWithForwarding |
|
| 150 | */ |
|
| 151 | public function testCreateUrlAliasPropertyValuesWithForwarding(array $testData) |
|
| 152 | { |
|
| 153 | list($createdUrlAlias, $locationId) = $testData; |
|
| 154 | ||
| 155 | $this->assertNotNull($createdUrlAlias->id); |
|
| 156 | ||
| 157 | $this->assertPropertiesCorrect( |
|
| 158 | array( |
|
| 159 | 'type' => URLAlias::LOCATION, |
|
| 160 | 'destination' => $locationId, |
|
| 161 | 'path' => '/Home/My-New-Site', |
|
| 162 | 'languageCodes' => array('eng-US'), |
|
| 163 | 'alwaysAvailable' => false, |
|
| 164 | 'isHistory' => false, |
|
| 165 | 'isCustom' => true, |
|
| 166 | 'forward' => true, |
|
| 167 | ), |
|
| 168 | $createdUrlAlias |
|
| 169 | ); |
|
| 170 | } |
|
| 171 | ||
| 172 | /** |
|
| 173 | * Test for the createUrlAlias() method. |
|
| @@ 207-226 (lines=20) @@ | ||
| 204 | * |
|
| 205 | * @depends testCreateUrlAliasWithAlwaysAvailable |
|
| 206 | */ |
|
| 207 | public function testCreateUrlAliasPropertyValuesWithAlwaysAvailable(array $testData) |
|
| 208 | { |
|
| 209 | list($createdUrlAlias, $locationId) = $testData; |
|
| 210 | ||
| 211 | $this->assertNotNull($createdUrlAlias->id); |
|
| 212 | ||
| 213 | $this->assertPropertiesCorrect( |
|
| 214 | array( |
|
| 215 | 'type' => URLAlias::LOCATION, |
|
| 216 | 'destination' => $locationId, |
|
| 217 | 'path' => '/Home/My-New-Site', |
|
| 218 | 'languageCodes' => array('eng-US'), |
|
| 219 | 'alwaysAvailable' => true, |
|
| 220 | 'isHistory' => false, |
|
| 221 | 'isCustom' => true, |
|
| 222 | 'forward' => false, |
|
| 223 | ), |
|
| 224 | $createdUrlAlias |
|
| 225 | ); |
|
| 226 | } |
|
| 227 | ||
| 228 | /** |
|
| 229 | * Test for the createUrlAlias() method. |
|
| @@ 485-504 (lines=20) @@ | ||
| 482 | * |
|
| 483 | * @depends testCreateGlobalUrlAliasForLocation |
|
| 484 | */ |
|
| 485 | public function testCreateGlobalUrlAliasForLocationPropertyValues($testData) |
|
| 486 | { |
|
| 487 | list($createdUrlAlias, $locationId) = $testData; |
|
| 488 | ||
| 489 | $this->assertNotNull($createdUrlAlias->id); |
|
| 490 | ||
| 491 | $this->assertPropertiesCorrect( |
|
| 492 | array( |
|
| 493 | 'type' => URLAlias::LOCATION, |
|
| 494 | 'destination' => $locationId, |
|
| 495 | 'path' => '/Home/My-New-Site-global', |
|
| 496 | 'languageCodes' => array('eng-US'), |
|
| 497 | 'alwaysAvailable' => true, |
|
| 498 | 'isHistory' => false, |
|
| 499 | 'isCustom' => true, |
|
| 500 | 'forward' => false, |
|
| 501 | ), |
|
| 502 | $createdUrlAlias |
|
| 503 | ); |
|
| 504 | } |
|
| 505 | ||
| 506 | /** |
|
| 507 | * @param \eZ\Publish\API\Repository\Values\Content\URLAlias |
|