summaryrefslogtreecommitdiff
path: root/_test/tests/inc/common_pageinfo.test.php
diff options
context:
space:
mode:
Diffstat (limited to '_test/tests/inc/common_pageinfo.test.php')
-rw-r--r--_test/tests/inc/common_pageinfo.test.php66
1 files changed, 33 insertions, 33 deletions
diff --git a/_test/tests/inc/common_pageinfo.test.php b/_test/tests/inc/common_pageinfo.test.php
index c54fbce26..0a1ea0a8f 100644
--- a/_test/tests/inc/common_pageinfo.test.php
+++ b/_test/tests/inc/common_pageinfo.test.php
@@ -31,18 +31,18 @@ class common_pageinfo_test extends DokuWikiTest {
'ismobile' => false,
'client' => 'testuser',
);
- $info['rev'] = null;
- $info['subscribed'] = false;
- $info['locked'] = false;
- $info['exists'] = false;
- $info['writable'] = true;
- $info['editable'] = true;
- $info['lastmod'] = false;
- $info['meta'] = array();
- $info['ip'] = null;
- $info['user'] = null;
- $info['sum'] = null;
- $info['editor'] = null;
+ $info['rev'] = null;
+ $info['subscribed'] = false;
+ $info['locked'] = false;
+ $info['exists'] = false;
+ $info['writable'] = true;
+ $info['editable'] = true;
+ $info['lastmod'] = false;
+ $info['meta'] = array();
+ $info['ip'] = null;
+ $info['user'] = null;
+ $info['sum'] = null;
+ $info['editor'] = null;
return $info;
}
@@ -72,15 +72,15 @@ class common_pageinfo_test extends DokuWikiTest {
$rev = filemtime($filename);
$info = $this->_get_expected_pageinfo();
- $info['id'] = 'wiki:syntax';
+ $info['id'] = 'wiki:syntax';
$info['namespace'] = 'wiki';
$info['filepath'] = $filename;
- $info['exists'] = true;
- $info['lastmod'] = $rev;
- $info['meta'] = p_get_metadata($ID);
+ $info['exists'] = true;
+ $info['lastmod'] = $rev;
+ $info['meta'] = p_get_metadata($ID);
$this->assertEquals($info, pageinfo());
- }
+ }
/**
* check info keys and values for anonymous user
@@ -88,8 +88,8 @@ class common_pageinfo_test extends DokuWikiTest {
function test_anonymoususer(){
global $ID,$conf,$REV;
- unset($_SERVER['REMOTE_USER']);
- global $USERINFO; $USERINFO = array();
+ unset($_SERVER['REMOTE_USER']);
+ global $USERINFO; $USERINFO = array();
$ID = 'wiki:syntax';
$filename = $conf['datadir'].'/wiki/syntax.txt';
@@ -104,15 +104,15 @@ class common_pageinfo_test extends DokuWikiTest {
$info['meta'] = p_get_metadata($ID);
$info['rev'] = '';
- $info = array_merge($info, array(
- 'isadmin' => false,
- 'ismanager' => false,
- 'perm' => 8,
- 'client' => '1.2.3.4',
+ $info = array_merge($info, array(
+ 'isadmin' => false,
+ 'ismanager' => false,
+ 'perm' => 8,
+ 'client' => '1.2.3.4',
));
unset($info['userinfo']);
$this->assertEquals($info, pageinfo());
- }
+ }
/**
* check info keys and values with $REV
@@ -135,7 +135,7 @@ class common_pageinfo_test extends DokuWikiTest {
$this->assertEquals($info, pageinfo());
$this->assertEquals($rev-100, $REV);
- }
+ }
/**
* check info keys and values with $RANGE
@@ -146,7 +146,7 @@ class common_pageinfo_test extends DokuWikiTest {
$ID = 'wiki:syntax';
$filename = $conf['datadir'].'/wiki/syntax.txt';
$rev = filemtime($filename);
- $range = '1000-2000';
+ $range = '1000-2000';
$info = $this->_get_expected_pageinfo();
$info['id'] = 'wiki:syntax';
@@ -160,18 +160,18 @@ class common_pageinfo_test extends DokuWikiTest {
// expected result $RANGE unchanged
$RANGE = $range;
- $this->assertEquals($info, pageinfo());
+ $this->assertEquals($info, pageinfo());
$this->assertFalse(isset($REV));
- $this->assertEquals($range,$RANGE);
+ $this->assertEquals($range,$RANGE);
// check $RANGE with $REV = current
// expected result: $RANGE unchanged, $REV cleared
$REV = $rev;
- $info['rev'] = '';
+ $info['rev'] = '';
- $this->assertEquals($info, pageinfo());
+ $this->assertEquals($info, pageinfo());
$this->assertEquals('',$REV);
- $this->assertEquals($range,$RANGE);
+ $this->assertEquals($range,$RANGE);
// check with a real $REV
// expected result: $REV and $RANGE are cleared
@@ -218,7 +218,7 @@ class common_pageinfo_test extends DokuWikiTest {
p_set_metadata($ID,array('last_change' => false));
$this->assertEquals($info, pageinfo());
- $this->assertEquals($info['meta']['last_change'], p_get_metadata($ID,'last_change'));
+ $this->assertEquals($info['meta']['last_change'], p_get_metadata($ID,'last_change'));
// fake an external edit, pageinfo should clear the last change from meta data
// and not return any editor data