From 84640af2d4d59686aa73c2b099e6dbfd8ecd3385 Mon Sep 17 00:00:00 2001 From: Phy Date: Mon, 25 Dec 2017 23:11:04 +0800 Subject: [PATCH 1/5] fix .travis.yml (remove not testable versions) --- .travis.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index d46dc98..ce21fc4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,12 @@ language: php php: - - "5.7" + - "nightly" + - "7.2" + - "7.1" + - "7.0" - "5.6" - - "5.5" - - "5.4" - - "5.3" env: - DOKUWIKI=master - - DOKUWIKI=stable before_install: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh install: sh travis.sh script: cd _test && phpunit --stderr --group plugin_publish From 7871b39b924f9169a879ea4d51eb344a97d8266a Mon Sep 17 00:00:00 2001 From: Phy Date: Tue, 26 Dec 2017 00:25:38 +0800 Subject: [PATCH 2/5] Add basic "show expected version" tests - add DOKU_UNITTEST check against static variable cache to make tests run --- _test/publish.test.php | 261 ++++++++++++++++++++++++++++++++++++++++- helper.php | 2 +- 2 files changed, 260 insertions(+), 3 deletions(-) diff --git a/_test/publish.test.php b/_test/publish.test.php index f96a0b8..967390f 100644 --- a/_test/publish.test.php +++ b/_test/publish.test.php @@ -8,6 +8,7 @@ * @group plugins * @group integrationtests * @author Michael Große + * @author Phy25 */ class approvel_test extends DokuWikiTest { @@ -34,8 +35,19 @@ public function setUp(){ $conf['useacl'] = 1; $conf['superuser'] = '@admin'; $AUTH_ACL = array( - '* @ALL 4', - '* @admin 16',); + '* @ALL 1', // READ only + '* @author 4', // EDIT + '* @admin 16',);// DELETE + } + + private function logout(){ + global $USERINFO; + $USERINFO = null; + + global $default_server_vars; + $default_server_vars['REMOTE_USER'] = null; //Hack until Issue splitbrain/dokuwiki#1099 is fixed + + $_SERVER['REMOTE_USER'] = null; } /** @@ -81,6 +93,251 @@ public function test_no_aprroved_banner() { strpos($response->getContent(), '