Beispiel #1
0
 /**
  * @runInSeparateProcess
  */
 public function testCase025()
 {
     $globalDir = '/php/global/dir';
     if (!defined('YAF_MODE')) {
         Yaf_G::iniSet('yaf.library', $globalDir);
     } else {
         ini_set('yaf.library', $globalDir);
     }
     $config = array("application" => array("directory" => TEST_APPLICATION_PATH . 'application/', "library" => array("directory" => "/tmp", "namespace" => "Foo, Bar")));
     $app = new Yaf_Application($config);
     $this->loader = Yaf_Loader::getInstance();
     $this->loader->registerLocalNamespace("Dummy");
     $this->assertEquals($config['application']['library']['directory'], $this->loader->getLibraryPath());
     $this->assertEquals($globalDir, $this->loader->getLibraryPath(true));
     $this->assertEquals(':Foo::Bar:Dummy:', $this->loader->getLocalNamespace());
     $this->assertTrue($this->loader->isLocalName('Bar_Name'));
 }