Code Duplication    Length = 12-14 lines in 2 locations

eZ/Publish/Core/Persistence/Legacy/Tests/Content/ContentHandlerTest.php 2 locations

@@ 610-623 (lines=14) @@
607
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Handler::load
608
     * @expectedException \eZ\Publish\Core\Base\Exceptions\NotFoundException
609
     */
610
    public function testLoadErrorNotFound()
611
    {
612
        $handler = $this->getContentHandler();
613
614
        $gatewayMock = $this->getGatewayMock();
615
616
        $gatewayMock->expects($this->once())
617
            ->method('load')
618
            ->will(
619
                $this->returnValue([])
620
            );
621
622
        $result = $handler->load(23, 2, ['eng-GB']);
623
    }
624
625
    /**
626
     * Returns a Content for {@link testCreateDraftFromVersion()}.
@@ 1442-1453 (lines=12) @@
1439
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Handler::copy
1440
     * @expectedException \eZ\Publish\Core\Base\Exceptions\NotFoundException
1441
     */
1442
    public function testCopyThrowsNotFoundExceptionVersionNotFound()
1443
    {
1444
        $handler = $this->getContentHandler();
1445
1446
        $gatewayMock = $this->getGatewayMock();
1447
        $gatewayMock->expects($this->once())
1448
            ->method('load')
1449
            ->with($this->equalTo(23, 32))
1450
            ->will($this->returnValue([]));
1451
1452
        $result = $handler->copy(23, 32);
1453
    }
1454
1455
    /**
1456
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Handler::setStatus