Code Duplication    Length = 20-20 lines in 4 locations

eZ/Publish/API/Repository/Tests/URLAliasServiceTest.php 4 locations

@@ 102-121 (lines=20) @@
99
     *
100
     * @depends testCreateUrlAlias
101
     */
102
    public function testCreateUrlAliasPropertyValues(array $testData)
103
    {
104
        list($createdUrlAlias, $locationId) = $testData;
105
106
        $this->assertNotNull($createdUrlAlias->id);
107
108
        $this->assertPropertiesCorrect(
109
            array(
110
                'type' => URLAlias::LOCATION,
111
                'destination' => $locationId,
112
                'path' => '/Home/My-New-Site',
113
                'languageCodes' => array('eng-US'),
114
                'alwaysAvailable' => false,
115
                'isHistory' => false,
116
                'isCustom' => true,
117
                'forward' => false,
118
            ),
119
            $createdUrlAlias
120
        );
121
    }
122
123
    /**
124
     * Test for the createUrlAlias() method.
@@ 159-178 (lines=20) @@
156
     *
157
     * @depends testCreateUrlAliasWithForwarding
158
     */
159
    public function testCreateUrlAliasPropertyValuesWithForwarding(array $testData)
160
    {
161
        list($createdUrlAlias, $locationId) = $testData;
162
163
        $this->assertNotNull($createdUrlAlias->id);
164
165
        $this->assertPropertiesCorrect(
166
            array(
167
                'type' => URLAlias::LOCATION,
168
                'destination' => $locationId,
169
                'path' => '/Home/My-New-Site',
170
                'languageCodes' => array('eng-US'),
171
                'alwaysAvailable' => false,
172
                'isHistory' => false,
173
                'isCustom' => true,
174
                'forward' => true,
175
            ),
176
            $createdUrlAlias
177
        );
178
    }
179
180
    /**
181
     * Test for the createUrlAlias() method.
@@ 215-234 (lines=20) @@
212
     *
213
     * @depends testCreateUrlAliasWithAlwaysAvailable
214
     */
215
    public function testCreateUrlAliasPropertyValuesWithAlwaysAvailable(array $testData)
216
    {
217
        list($createdUrlAlias, $locationId) = $testData;
218
219
        $this->assertNotNull($createdUrlAlias->id);
220
221
        $this->assertPropertiesCorrect(
222
            array(
223
                'type' => URLAlias::LOCATION,
224
                'destination' => $locationId,
225
                'path' => '/Home/My-New-Site',
226
                'languageCodes' => array('eng-US'),
227
                'alwaysAvailable' => true,
228
                'isHistory' => false,
229
                'isCustom' => true,
230
                'forward' => false,
231
            ),
232
            $createdUrlAlias
233
        );
234
    }
235
236
    /**
237
     * Test for the createUrlAlias() method.
@@ 493-512 (lines=20) @@
490
     *
491
     * @depends testCreateGlobalUrlAliasForLocation
492
     */
493
    public function testCreateGlobalUrlAliasForLocationPropertyValues($testData)
494
    {
495
        list($createdUrlAlias, $locationId) = $testData;
496
497
        $this->assertNotNull($createdUrlAlias->id);
498
499
        $this->assertPropertiesCorrect(
500
            array(
501
                'type' => URLAlias::LOCATION,
502
                'destination' => $locationId,
503
                'path' => '/Home/My-New-Site-global',
504
                'languageCodes' => array('eng-US'),
505
                'alwaysAvailable' => true,
506
                'isHistory' => false,
507
                'isCustom' => true,
508
                'forward' => false,
509
            ),
510
            $createdUrlAlias
511
        );
512
    }
513
514
    /**
515
     * @param \eZ\Publish\API\Repository\Values\Content\URLAlias