Code Duplication    Length = 21-21 lines in 2 locations

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

@@ 1817-1837 (lines=21) @@
1814
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
1815
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testPublishVersionFromContentDraft
1816
     */
1817
    public function testDeleteContent()
1818
    {
1819
        $repository = $this->getRepository();
1820
1821
        $contentService = $repository->getContentService();
1822
        $locationService = $repository->getLocationService();
1823
1824
        /* BEGIN: Use Case */
1825
        $contentVersion2 = $this->createContentVersion2();
1826
1827
        // Load the locations for this content object
1828
        $locations = $locationService->loadLocations($contentVersion2->contentInfo);
1829
1830
        // This will delete the content, all versions and the associated locations
1831
        $contentService->deleteContent($contentVersion2->contentInfo);
1832
        /* END: Use Case */
1833
1834
        foreach ($locations as $location) {
1835
            $locationService->loadLocation($location->id);
1836
        }
1837
    }
1838
1839
    /**
1840
     * Test for the deleteContent() method.
@@ 1849-1869 (lines=21) @@
1846
     * @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
1847
     * @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testPublishVersionFromContentDraft
1848
     */
1849
    public function testDeleteContentWithEmptyBinaryField()
1850
    {
1851
        $repository = $this->getRepository();
1852
1853
        $contentService = $repository->getContentService();
1854
        $locationService = $repository->getLocationService();
1855
1856
        /* BEGIN: Use Case */
1857
        $contentVersion = $this->createContentVersion1EmptyBinaryField();
1858
1859
        // Load the locations for this content object
1860
        $locations = $locationService->loadLocations($contentVersion->contentInfo);
1861
1862
        // This will delete the content, all versions and the associated locations
1863
        $contentService->deleteContent($contentVersion->contentInfo);
1864
        /* END: Use Case */
1865
1866
        foreach ($locations as $location) {
1867
            $locationService->loadLocation($location->id);
1868
        }
1869
    }
1870
1871
    /**
1872
     * Test for the loadContentDrafts() method.