diff options
author | Anika Henke <anika@selfthinker.org> | 2013-12-07 23:10:05 +0000 |
---|---|---|
committer | Anika Henke <anika@selfthinker.org> | 2013-12-07 23:10:05 +0000 |
commit | ccfec5606dae81e6524f6cfcdaca09d4cde7f111 (patch) | |
tree | cef0da42e35197b6c63e0b58ab47aa14afa5f087 /_test/tests | |
parent | 0d39ad11692680a8e94ae441a39029032964b3b0 (diff) | |
download | rpg-ccfec5606dae81e6524f6cfcdaca09d4cde7f111.tar.gz rpg-ccfec5606dae81e6524f6cfcdaca09d4cde7f111.tar.bz2 |
crlf 2 lf whitespace fixes
Diffstat (limited to '_test/tests')
-rw-r--r-- | _test/tests/inc/common_basicinfo.test.php | 10 | ||||
-rw-r--r-- | _test/tests/inc/common_mediainfo.test.php | 10 | ||||
-rw-r--r-- | _test/tests/inc/common_pageinfo.test.php | 66 | ||||
-rw-r--r-- | _test/tests/test/basic.test.php | 12 |
4 files changed, 49 insertions, 49 deletions
diff --git a/_test/tests/inc/common_basicinfo.test.php b/_test/tests/inc/common_basicinfo.test.php index 0369474c9..8359c0877 100644 --- a/_test/tests/inc/common_basicinfo.test.php +++ b/_test/tests/inc/common_basicinfo.test.php @@ -18,12 +18,12 @@ class common_infofunctions_test extends DokuWikiTest { function _get_info() { global $USERINFO; - $info = array (
- 'isadmin' => true,
+ $info = array ( + 'isadmin' => true, 'ismanager' => true, - 'userinfo' => $USERINFO,
- 'perm' => 255,
- 'namespace' => false,
+ 'userinfo' => $USERINFO, + 'perm' => 255, + 'namespace' => false, 'ismobile' => false, 'client' => 'testuser', ); diff --git a/_test/tests/inc/common_mediainfo.test.php b/_test/tests/inc/common_mediainfo.test.php index 0e67fbcd9..cc5b17ec7 100644 --- a/_test/tests/inc/common_mediainfo.test.php +++ b/_test/tests/inc/common_mediainfo.test.php @@ -18,12 +18,12 @@ class common_basicinfo_test extends DokuWikiTest { function _get_info() { global $USERINFO; - $info = array (
- 'isadmin' => true,
+ $info = array ( + 'isadmin' => true, 'ismanager' => true, - 'userinfo' => $USERINFO,
- 'perm' => 255,
- 'namespace' => false,
+ 'userinfo' => $USERINFO, + 'perm' => 255, + 'namespace' => false, 'ismobile' => false, 'client' => 'testuser', ); 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 diff --git a/_test/tests/test/basic.test.php b/_test/tests/test/basic.test.php index 05778ccf9..86acef935 100644 --- a/_test/tests/test/basic.test.php +++ b/_test/tests/test/basic.test.php @@ -123,11 +123,11 @@ class InttestsBasicTest extends DokuWikiTest { $request = new TestRequest(); // doku - $response = $request->get();
- $this->assertEquals('doku.php',$request->getScript());
+ $response = $request->get(); + $this->assertEquals('doku.php',$request->getScript()); - $response = $request->get(array(),'/doku.php?id=wiki:dokuwiki&test=foo');
- $this->assertEquals('doku.php',$request->getScript());
+ $response = $request->get(array(),'/doku.php?id=wiki:dokuwiki&test=foo'); + $this->assertEquals('doku.php',$request->getScript()); // fetch $response = $request->get(array(),'/lib/exe/fetch.php?media=wiki:dokuwiki-128.png'); @@ -149,8 +149,8 @@ class InttestsBasicTest extends DokuWikiTest { $request = new TestRequest(); $response = $request->get(array(),'/lib/exe/fetch.php?media=wiki:dokuwiki-128.png'); - $headers = $response->getHeaders();
- $this->assertTrue(!empty($headers));
+ $headers = $response->getHeaders(); + $this->assertTrue(!empty($headers)); } function testGetHeader(){ |