Code Duplication    Length = 11-11 lines in 2 locations

tests/Xtools/PageTest.php 2 locations

@@ 80-90 (lines=11) @@
77
    /**
78
     * A page has an integer ID on a given project.
79
     */
80
    public function testId()
81
    {
82
        $pageRepo = $this->getMock(PagesRepository::class, ['getPageInfo']);
83
        $pageRepo->expects($this->once())
84
            ->method('getPageInfo')
85
            ->willReturn(['pageid' => '42']);
86
87
        $page = new Page(new Project('TestProject'), 'Test_Page');
88
        $page->setRepository($pageRepo);
89
        $this->assertEquals(42, $page->getId());
90
    }
91
92
    /**
93
     * A page has a URL.
@@ 95-105 (lines=11) @@
92
    /**
93
     * A page has a URL.
94
     */
95
    public function testUrls()
96
    {
97
        $pageRepo = $this->getMock(PagesRepository::class, ['getPageInfo']);
98
        $pageRepo->expects($this->once())
99
            ->method('getPageInfo')
100
            ->willReturn(['fullurl' => 'https://example.org/Page']);
101
102
        $page = new Page(new Project('exampleWiki'), 'Page');
103
        $page->setRepository($pageRepo);
104
        $this->assertEquals('https://example.org/Page', $page->getUrl());
105
    }
106
107
    /**
108
     * A list of a single user's edits on this page can be retrieved, along with the count of