Skip to content
Snippets Groups Projects
Commit 24f55d9e authored by Laurent's avatar Laurent
Browse files

Omeka plugin should not be enabled without url

parent e834fd41
Branches
Tags
2 merge requests!2415Master,!2409Master
Pipeline #2992 passed with stage
in 26 minutes and 50 seconds
......@@ -43,7 +43,7 @@ class Omeka_Config extends Class_DigitalResource_Config {
public function isEnabled() {
return (new ZendAfi_Validate_Url())->isValid($this->getRootUrl());
return $this->getRootUrl() && ((new ZendAfi_Validate_Url())->isValid($this->getRootUrl()));
}
......
......@@ -143,5 +143,12 @@ class OmekaHarvestedTest extends AbstractControllerTestCase {
$this->assertXPathContentContains('//a[@class="omeka"][@href="http://omeka-demo.biblibre.com/items/show/659"]',
'ressource sur Omeka');
}
/** @test */
public function withoutRootURLShouldBeDisabled() {
Class_AdminVar::set('Omeka_ROOT_URL', '');
$this->assertFalse((new Class_DigitalResource())->configFor('Omeka')->isEnabled());
}
}
?>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment