diff --git a/library/Icinga/Application/ClassLoader.php b/library/Icinga/Application/ClassLoader.php index e31aa49af..ab3326f84 100644 --- a/library/Icinga/Application/ClassLoader.php +++ b/library/Icinga/Application/ClassLoader.php @@ -29,18 +29,9 @@ class ClassLoader * @param string $directory * * @return $this - * @throws ProgrammingError */ public function registerNamespace($namespace, $directory) { - if (!is_dir($directory)) { - throw new ProgrammingError( - 'Directory "%s" for namespace "%s" does not exist', - $directory, - $namespace - ); - } - $this->namespaces[$namespace] = $directory; return $this; diff --git a/test/php/library/Icinga/Application/ClassLoaderTest.php b/test/php/library/Icinga/Application/ClassLoaderTest.php index ebc3c7572..86975df43 100644 --- a/test/php/library/Icinga/Application/ClassLoaderTest.php +++ b/test/php/library/Icinga/Application/ClassLoaderTest.php @@ -107,13 +107,4 @@ EOD; $o = new \My\Library\TestStruct(); $this->assertTrue($o->testFlag()); } - - /** - * @expectedException Icinga\Exception\ProgrammingError - */ - public function testNonexistingDirectory() - { - $loader = new ClassLoader(); - $loader->registerNamespace('My\\Library', '/trullalla/123'); - } }