1<?php
2
3use \dokuwiki\ChangeLog\PageChangeLog;
4
5/**
6 * Tests for if a page has revisions with hasRevisions()
7 *
8 * This class uses the files:
9 * - data/meta/mailinglist.changes
10 */
11class changelog_hasrevisions_test extends DokuWikiTest {
12
13    /**
14     * test page has revisions
15     */
16    function test_hasrevisions() {
17        $id = 'mailinglist';
18
19        $pagelog = new PageChangeLog($id);
20        $result = $pagelog->hasRevisions();
21        $this->assertTrue($result);
22    }
23
24    /**
25     * test page has no revisions
26     */
27    function test_norevisions() {
28        $id = 'nonexist';
29
30        $pagelog = new PageChangeLog($id);
31        $result = $pagelog->hasRevisions();
32        $this->assertFalse($result);
33    }
34}
35