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