summaryrefslogtreecommitdiff
path: root/lib/plugins/styling/_test
diff options
context:
space:
mode:
authorAnika Henke <anika@selfthinker.org>2015-07-26 15:06:21 +0100
committerAnika Henke <anika@selfthinker.org>2015-07-26 15:06:21 +0100
commit6439cee6ee86a156a7a138021521f579ef444b80 (patch)
tree56bbad12a63f1b1022ee0b6c3a3c58abb3d6962d /lib/plugins/styling/_test
parente7aa4a376b81e5ae9ee069215afc1bf42cbbf982 (diff)
parentec2b4bab83a5eb6ddcdb41853d311b99b71c6f86 (diff)
downloadrpg-6439cee6ee86a156a7a138021521f579ef444b80.tar.gz
rpg-6439cee6ee86a156a7a138021521f579ef444b80.tar.bz2
Merge pull request #1163 from splitbrain/styler
Template Style Dialog Plugin
Diffstat (limited to 'lib/plugins/styling/_test')
-rw-r--r--lib/plugins/styling/_test/general.test.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/plugins/styling/_test/general.test.php b/lib/plugins/styling/_test/general.test.php
new file mode 100644
index 000000000..1337f6f75
--- /dev/null
+++ b/lib/plugins/styling/_test/general.test.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * General tests for the styling plugin
+ *
+ * @group plugin_styling
+ * @group plugins
+ */
+class general_plugin_styling_test extends DokuWikiTest {
+
+ /**
+ * Simple test to make sure the plugin.info.txt is in correct format
+ */
+ public function test_plugininfo() {
+ $file = __DIR__.'/../plugin.info.txt';
+ $this->assertFileExists($file);
+
+ $info = confToHash($file);
+
+ $this->assertArrayHasKey('base', $info);
+ $this->assertArrayHasKey('author', $info);
+ $this->assertArrayHasKey('email', $info);
+ $this->assertArrayHasKey('date', $info);
+ $this->assertArrayHasKey('name', $info);
+ $this->assertArrayHasKey('desc', $info);
+ $this->assertArrayHasKey('url', $info);
+
+ $this->assertEquals('styling', $info['base']);
+ $this->assertRegExp('/^https?:\/\//', $info['url']);
+ $this->assertTrue(mail_isvalid($info['email']));
+ $this->assertRegExp('/^\d\d\d\d-\d\d-\d\d$/', $info['date']);
+ $this->assertTrue(false !== strtotime($info['date']));
+ }
+}