Code Duplication    Length = 18-18 lines in 2 locations

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

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