Code Duplication    Length = 21-21 lines in 2 locations

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

@@ 517-537 (lines=21) @@
514
    /**
515
     * @covers eZ\Publish\Core\Persistence\Legacy\Content\Handler::loadContentInfoByRemoteId
516
     */
517
    public function testLoadContentInfoByRemoteId()
518
    {
519
        $contentInfoData = array(new ContentInfo());
520
        $this->getGatewayMock()->expects($this->once())
521
            ->method('loadContentInfoByRemoteId')
522
            ->with(
523
                $this->equalTo('15b256dbea2ae72418ff5facc999e8f9')
524
            )->will(
525
                $this->returnValue(array(42))
526
            );
527
528
        $this->getMapperMock()->expects($this->once())
529
            ->method('extractContentInfoFromRow')
530
            ->with($this->equalTo(array(42)))
531
            ->will($this->returnValue($contentInfoData));
532
533
        $this->assertSame(
534
            $contentInfoData,
535
            $this->getContentHandler()->loadContentInfoByRemoteId('15b256dbea2ae72418ff5facc999e8f9')
536
        );
537
    }
538
539
    /**
540
     * @covers eZ\Publish\Core\Persistence\Legacy\Content\Handler::load

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

@@ 24-44 (lines=21) @@
21
 */
22
class TreeHandlerTest extends TestCase
23
{
24
    public function testLoadContentInfoByRemoteId()
25
    {
26
        $contentInfoData = array(new ContentInfo());
27
28
        $this->getContentGatewayMock()
29
            ->expects($this->once())
30
            ->method('loadContentInfo')
31
            ->with(42)
32
            ->will($this->returnValue(array(42)));
33
34
        $this->getContentMapperMock()
35
            ->expects($this->once())
36
            ->method('extractContentInfoFromRow')
37
            ->with($this->equalTo(array(42)))
38
            ->will($this->returnValue($contentInfoData));
39
40
        $this->assertSame(
41
            $contentInfoData,
42
            $this->getTreeHandler()->loadContentInfo(42)
43
        );
44
    }
45
46
    public function testListVersions()
47
    {