diff options
author | Andreas Gohr <andi@splitbrain.org> | 2015-05-23 15:29:33 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2015-05-23 15:29:33 +0200 |
commit | 123bc813fd93ab5d8dab3cc4a66a09e613a10aa2 (patch) | |
tree | f96350fd7837dff3c943a7dedfa32e991c26eace /lib/plugins/styling/_test/general.test.php | |
parent | d071b66c820e5b1ecc60efc27a15e113c88832af (diff) | |
download | rpg-123bc813fd93ab5d8dab3cc4a66a09e613a10aa2.tar.gz rpg-123bc813fd93ab5d8dab3cc4a66a09e613a10aa2.tar.bz2 |
renamed plugin from styler to styling
styler was already taken
Diffstat (limited to 'lib/plugins/styling/_test/general.test.php')
-rw-r--r-- | lib/plugins/styling/_test/general.test.php | 33 |
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'])); + } +} |