Code Duplication    Length = 8-11 lines in 2 locations

eZ/Publish/Core/Repository/Tests/Service/Mock/ContentTest.php 2 locations

@@ 830-837 (lines=8) @@
827
     *
828
     * @covers \eZ\Publish\Core\Repository\ContentService::createContent
829
     */
830
    public function testCreateContentThrowsInvalidArgumentExceptionMainLanguageCodeNotSet()
831
    {
832
        $this->expectException(\eZ\Publish\API\Repository\Exceptions\InvalidArgumentException::class);
833
        $this->expectExceptionMessage('Argument \'$contentCreateStruct\' is invalid: \'mainLanguageCode\' property must be set');
834
835
        $mockedService = $this->getPartlyMockedContentService();
836
        $mockedService->createContent(new ContentCreateStruct(), array());
837
    }
838
839
    /**
840
     * Test for the createContent() method.
@@ 844-854 (lines=11) @@
841
     *
842
     * @covers \eZ\Publish\Core\Repository\ContentService::createContent
843
     */
844
    public function testCreateContentThrowsInvalidArgumentExceptionContentTypeNotSet()
845
    {
846
        $this->expectException(\eZ\Publish\API\Repository\Exceptions\InvalidArgumentException::class);
847
        $this->expectExceptionMessage('Argument \'$contentCreateStruct\' is invalid: \'contentType\' property must be set');
848
849
        $mockedService = $this->getPartlyMockedContentService();
850
        $mockedService->createContent(
851
            new ContentCreateStruct(array('mainLanguageCode' => 'eng-US')),
852
            array()
853
        );
854
    }
855
856
    /**
857
     * Test for the createContent() method.