Code Duplication    Length = 20-20 lines in 4 locations

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

@@ 126-145 (lines=20) @@
123
     *
124
     * @depends testCreateUrlAlias
125
     */
126
    public function testCreateUrlAliasPropertyValues(array $testData)
127
    {
128
        list($createdUrlAlias, $locationId) = $testData;
129
130
        $this->assertNotNull($createdUrlAlias->id);
131
132
        $this->assertPropertiesCorrect(
133
            [
134
                'type' => URLAlias::LOCATION,
135
                'destination' => $locationId,
136
                'path' => '/Home/My-New-Site',
137
                'languageCodes' => ['eng-US'],
138
                'alwaysAvailable' => false,
139
                'isHistory' => false,
140
                'isCustom' => true,
141
                'forward' => false,
142
            ],
143
            $createdUrlAlias
144
        );
145
    }
146
147
    /**
148
     * Test for the createUrlAlias() method.
@@ 183-202 (lines=20) @@
180
     *
181
     * @depends testCreateUrlAliasWithForwarding
182
     */
183
    public function testCreateUrlAliasPropertyValuesWithForwarding(array $testData)
184
    {
185
        list($createdUrlAlias, $locationId) = $testData;
186
187
        $this->assertNotNull($createdUrlAlias->id);
188
189
        $this->assertPropertiesCorrect(
190
            [
191
                'type' => URLAlias::LOCATION,
192
                'destination' => $locationId,
193
                'path' => '/Home/My-New-Site',
194
                'languageCodes' => ['eng-US'],
195
                'alwaysAvailable' => false,
196
                'isHistory' => false,
197
                'isCustom' => true,
198
                'forward' => true,
199
            ],
200
            $createdUrlAlias
201
        );
202
    }
203
204
    /**
205
     * Test for the createUrlAlias() method.
@@ 239-258 (lines=20) @@
236
     *
237
     * @depends testCreateUrlAliasWithAlwaysAvailable
238
     */
239
    public function testCreateUrlAliasPropertyValuesWithAlwaysAvailable(array $testData)
240
    {
241
        list($createdUrlAlias, $locationId) = $testData;
242
243
        $this->assertNotNull($createdUrlAlias->id);
244
245
        $this->assertPropertiesCorrect(
246
            [
247
                'type' => URLAlias::LOCATION,
248
                'destination' => $locationId,
249
                'path' => '/Home/My-New-Site',
250
                'languageCodes' => ['eng-US'],
251
                'alwaysAvailable' => true,
252
                'isHistory' => false,
253
                'isCustom' => true,
254
                'forward' => false,
255
            ],
256
            $createdUrlAlias
257
        );
258
    }
259
260
    /**
261
     * Test for the createUrlAlias() method.
@@ 517-536 (lines=20) @@
514
     *
515
     * @depends testCreateGlobalUrlAliasForLocation
516
     */
517
    public function testCreateGlobalUrlAliasForLocationPropertyValues($testData)
518
    {
519
        list($createdUrlAlias, $locationId) = $testData;
520
521
        $this->assertNotNull($createdUrlAlias->id);
522
523
        $this->assertPropertiesCorrect(
524
            [
525
                'type' => URLAlias::LOCATION,
526
                'destination' => $locationId,
527
                'path' => '/Home/My-New-Site-global',
528
                'languageCodes' => ['eng-US'],
529
                'alwaysAvailable' => true,
530
                'isHistory' => false,
531
                'isCustom' => true,
532
                'forward' => false,
533
            ],
534
            $createdUrlAlias
535
        );
536
    }
537
538
    /**
539
     * @param \eZ\Publish\API\Repository\Values\Content\URLAlias