Code Duplication    Length = 18-18 lines in 2 locations

eZ/Publish/API/Repository/Tests/ContentServiceTest.php 2 locations

@@ 2099-2116 (lines=18) @@
2096
     * @see \eZ\Publish\API\Repository\ContentService::deleteContent()
2097
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testPublishVersionFromContentDraft
2098
     */
2099
    public function testDeleteContent()
2100
    {
2101
        /* BEGIN: Use Case */
2102
        $contentVersion2 = $this->createContentVersion2();
2103
2104
        // Load the locations for this content object
2105
        $locations = $this->locationService->loadLocations($contentVersion2->contentInfo);
2106
2107
        // This will delete the content, all versions and the associated locations
2108
        $this->contentService->deleteContent($contentVersion2->contentInfo);
2109
        /* END: Use Case */
2110
2111
        $this->expectException(NotFoundException::class);
2112
2113
        foreach ($locations as $location) {
2114
            $this->locationService->loadLocation($location->id);
2115
        }
2116
    }
2117
2118
    /**
2119
     * Test for the deleteContent() method.
@@ 2127-2144 (lines=18) @@
2124
     * @see \eZ\Publish\API\Repository\ContentService::deleteContent()
2125
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testPublishVersionFromContentDraft
2126
     */
2127
    public function testDeleteContentWithEmptyBinaryField()
2128
    {
2129
        /* BEGIN: Use Case */
2130
        $contentVersion = $this->createContentVersion1EmptyBinaryField();
2131
2132
        // Load the locations for this content object
2133
        $locations = $this->locationService->loadLocations($contentVersion->contentInfo);
2134
2135
        // This will delete the content, all versions and the associated locations
2136
        $this->contentService->deleteContent($contentVersion->contentInfo);
2137
        /* END: Use Case */
2138
2139
        $this->expectException(NotFoundException::class);
2140
2141
        foreach ($locations as $location) {
2142
            $this->locationService->loadLocation($location->id);
2143
        }
2144
    }
2145
2146
    public function testCountContentDraftsReturnsZeroByDefault(): void
2147
    {