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
            [
110
                'type' => URLAlias::LOCATION,
111
                'destination' => $locationId,
112
                'path' => '/Home/My-New-Site',
113
                'languageCodes' => ['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
            [
167
                'type' => URLAlias::LOCATION,
168
                'destination' => $locationId,
169
                'path' => '/Home/My-New-Site',
170
                'languageCodes' => ['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
            [
223
                'type' => URLAlias::LOCATION,
224
                'destination' => $locationId,
225
                'path' => '/Home/My-New-Site',
226
                'languageCodes' => ['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.
@@ 494-513 (lines=20) @@
491
     *
492
     * @depends testCreateGlobalUrlAliasForLocation
493
     */
494
    public function testCreateGlobalUrlAliasForLocationPropertyValues($testData)
495
    {
496
        list($createdUrlAlias, $locationId) = $testData;
497
498
        $this->assertNotNull($createdUrlAlias->id);
499
500
        $this->assertPropertiesCorrect(
501
            [
502
                'type' => URLAlias::LOCATION,
503
                'destination' => $locationId,
504
                'path' => '/Home/My-New-Site-global',
505
                'languageCodes' => ['eng-US'],
506
                'alwaysAvailable' => true,
507
                'isHistory' => false,
508
                'isCustom' => true,
509
                'forward' => false,
510
            ],
511
            $createdUrlAlias
512
        );
513
    }
514
515
    /**
516
     * @param \eZ\Publish\API\Repository\Values\Content\URLAlias