Code Duplication    Length = 14-14 lines in 2 locations

eZ/Publish/Core/Persistence/Legacy/Tests/Content/ObjectState/ObjectStateHandlerTest.php 1 location

@@ 414-427 (lines=14) @@
411
    /**
412
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Handler::loadByIdentifier
413
     */
414
    public function testLoadByIdentifierThrowsNotFoundException()
415
    {
416
        $this->expectException(\eZ\Publish\API\Repository\Exceptions\NotFoundException::class);
417
418
        $handler = $this->getObjectStateHandler();
419
        $gatewayMock = $this->getGatewayMock();
420
421
        $gatewayMock->expects($this->once())
422
            ->method('loadObjectStateDataByIdentifier')
423
            ->with($this->equalTo('unknown'), $this->equalTo(2))
424
            ->will($this->returnValue([]));
425
426
        $handler->loadByIdentifier('unknown', 2);
427
    }
428
429
    /**
430
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Handler::update

eZ/Publish/Core/Persistence/Legacy/Tests/Content/ContentHandlerTest.php 1 location

@@ 1419-1432 (lines=14) @@
1416
    /**
1417
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Handler::copy
1418
     */
1419
    public function testCopyThrowsNotFoundExceptionVersionNotFound()
1420
    {
1421
        $this->expectException(\eZ\Publish\Core\Base\Exceptions\NotFoundException::class);
1422
1423
        $handler = $this->getContentHandler();
1424
1425
        $gatewayMock = $this->getGatewayMock();
1426
        $gatewayMock->expects($this->once())
1427
            ->method('load')
1428
            ->with($this->equalTo(23, 32))
1429
            ->will($this->returnValue([]));
1430
1431
        $result = $handler->copy(23, 32);
1432
    }
1433
1434
    /**
1435
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Handler::setStatus