Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mprins/dokuwiki-plugin-spatialhelper
Browse files Browse the repository at this point in the history
  • Loading branch information
mprins committed Sep 11, 2016
2 parents 46d7eef + f202bfb commit 4ff427a
Show file tree
Hide file tree
Showing 7 changed files with 303 additions and 298 deletions.
62 changes: 31 additions & 31 deletions _test/general.test.php
Expand Up @@ -23,40 +23,40 @@
*/
class general_plugin_spatialhelper_test extends DokuWikiTest {

protected $pluginsEnabled = array('spatialhelper');
protected $pluginsEnabled = array('spatialhelper');

/**
* 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);
/**
* 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);
$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->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('spatialhelper', $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']));
}
$this->assertEquals('spatialhelper', $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']));
}

/**
* test if plugin is loaded.
*/
public function test_plugin_spatialhelper_isloaded() {
global $plugin_controller;
$this->assertTrue(
in_array('spatialhelper', $plugin_controller->getList()),
"spatialhelper plugin is loaded"
);
}
/**
* test if plugin is loaded.
*/
public function test_plugin_spatialhelper_isloaded() {
global $plugin_controller;
$this->assertTrue(
in_array('spatialhelper', $plugin_controller->getList()),
"spatialhelper plugin is loaded"
);
}
}

0 comments on commit 4ff427a

Please sign in to comment.