Code Duplication    Length = 21-21 lines in 2 locations

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

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

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

@@ 580-600 (lines=21) @@
577
    /**
578
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Handler::loadContentInfoByRemoteId
579
     */
580
    public function testLoadContentInfoByRemoteId()
581
    {
582
        $contentInfoData = array(new ContentInfo());
583
        $this->getGatewayMock()->expects($this->once())
584
            ->method('loadContentInfoByRemoteId')
585
            ->with(
586
                $this->equalTo('15b256dbea2ae72418ff5facc999e8f9')
587
            )->will(
588
                $this->returnValue(array(42))
589
            );
590
591
        $this->getMapperMock()->expects($this->once())
592
            ->method('extractContentInfoFromRow')
593
            ->with($this->equalTo(array(42)))
594
            ->will($this->returnValue($contentInfoData));
595
596
        $this->assertSame(
597
            $contentInfoData,
598
            $this->getContentHandler()->loadContentInfoByRemoteId('15b256dbea2ae72418ff5facc999e8f9')
599
        );
600
    }
601
602
    /**
603
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Handler::load