diff options
author | Andreas Gohr <andi@splitbrain.org> | 2016-01-30 18:07:19 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2016-01-30 18:07:19 +0100 |
commit | 29a1d29118859a65e07d45891c58c0734b38ca9d (patch) | |
tree | 74d6dd1e979d603036d3ab888fb14673a4f2a796 /lib/plugins/authpdo/_test | |
parent | 0d586afdf931ff216350371cc55bb719b8e5e442 (diff) | |
download | dokuwiki-29a1d29118859a65e07d45891c58c0734b38ca9d.tar.gz dokuwiki-29a1d29118859a65e07d45891c58c0734b38ca9d.zip |
skip tests if sqlite or pdo is missing
Diffstat (limited to 'lib/plugins/authpdo/_test')
-rw-r--r-- | lib/plugins/authpdo/_test/sqlite.test.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/plugins/authpdo/_test/sqlite.test.php b/lib/plugins/authpdo/_test/sqlite.test.php index 3941d7094..fd980e8cc 100644 --- a/lib/plugins/authpdo/_test/sqlite.test.php +++ b/lib/plugins/authpdo/_test/sqlite.test.php @@ -29,6 +29,12 @@ class sqlite_plugin_authpdo_test extends DokuWikiTest { protected $dbfile; + public function test_pdo_sqlite_support() { + if(!class_exists('PDO') || !in_array('sqlite',PDO::getAvailableDrivers())) { + $this->markTestSkipped('skipping all authpdo tests for sqlite. Need PDO_sqlite extension'); + } + } + public function setUp() { parent::setUp(); $this->dbfile = tempnam('/tmp/', 'pluginpdo_test_'); @@ -83,6 +89,9 @@ class sqlite_plugin_authpdo_test extends DokuWikiTest { unlink($this->dbfile); } + /** + * @depends test_pdo_sqlite_support + */ public function test_internals() { $auth = new testable_auth_plugin_authpdo(); @@ -99,6 +108,9 @@ class sqlite_plugin_authpdo_test extends DokuWikiTest { $this->assertEquals(3, $groups['test']['gid']); } + /** + * @depends test_pdo_sqlite_support + */ public function test_userinfo() { global $conf; $auth = new auth_plugin_authpdo(); |