summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authorlisps <stummp@loewen.de>2013-11-22 14:56:42 +0100
committerlisps <stummp@loewen.de>2013-11-22 14:56:42 +0100
commit07a7d227f78d5956f62a4164def7c68ca03019ee (patch)
treefd77434faf2cc73d35af5afeda14b5b773976a89 /_test
parent52dc5ead7374060b89484fc0713bc38d8ec1467c (diff)
downloadrpg-07a7d227f78d5956f62a4164def7c68ca03019ee.tar.gz
rpg-07a7d227f78d5956f62a4164def7c68ca03019ee.tar.bz2
add test for empty rev in ml() and wl()
Diffstat (limited to '_test')
-rw-r--r--_test/tests/inc/common_ml.test.php11
-rw-r--r--_test/tests/inc/common_wl.test.php11
2 files changed, 22 insertions, 0 deletions
diff --git a/_test/tests/inc/common_ml.test.php b/_test/tests/inc/common_ml.test.php
index 415c0a88d..027dcaef2 100644
--- a/_test/tests/inc/common_ml.test.php
+++ b/_test/tests/inc/common_ml.test.php
@@ -146,4 +146,15 @@ class common_ml_test extends DokuWikiTest {
$this->assertEquals($expect, ml($id, $args));
}
+
+ function test_ml_empty_rev() {
+ global $conf;
+ $conf['useslash'] = 0;
+ $conf['userewrite'] = 0;
+
+ $args = array('a' => 'b', 'c' => 'd', 'rev' => '');
+
+ $expect = DOKU_BASE . $this->script . '?a=b&amp;c=d&amp;media=some:img.jpg';
+ $this->assertEquals($expect, ml('some:img.jpg', $args));
+ }
}
diff --git a/_test/tests/inc/common_wl.test.php b/_test/tests/inc/common_wl.test.php
index 2e34dcae3..4bfde3f39 100644
--- a/_test/tests/inc/common_wl.test.php
+++ b/_test/tests/inc/common_wl.test.php
@@ -142,6 +142,17 @@ class common_wl_test extends DokuWikiTest {
$expect = DOKU_BASE . DOKU_SCRIPT . '/some/one?a=b&c=d';
$this->assertEquals($expect, wl('some:one', 'a=b,c=d', false, '&'));
}
+
+ function test_wl_empty_rev() {
+ global $conf;
+ $conf['useslash'] = 0;
+ $conf['userewrite'] = 0;
+
+ $args = array('a' => 'b', 'c' => 'd', 'rev' => '');
+
+ $expect = DOKU_BASE . DOKU_SCRIPT . '?id=some:&amp;a=b&amp;c=d';
+ $this->assertEquals($expect, wl('some:', $args));
+ }