Code Duplication    Length = 18-18 lines in 2 locations

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

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