예제 #1
0
 /**
  * Class construct
  * @return void
  */
 public function __construct()
 {
     if (null === static::$_instance) {
         $this->_setupEnvironmentVars();
         \Nimbles\Core\Loader::register();
         static::$_instance = $this;
     }
 }
예제 #2
0
 /**
  * Tests autoloading classes
  * @return void
  */
 public function testAutoload()
 {
     \Nimbles\Core\Loader::autoload('Nimbles');
     $this->assertTrue(class_exists('Nimbles', false));
     $this->assertFalse(class_exists('Tests\\Lib\\Nimbles\\Core\\Loader\\Mock', false));
     $this->assertTrue(\Nimbles\Core\Loader::autoload('Tests\\Lib\\Nimbles\\Core\\Loader\\Mock'), 'Failed to locate file for Mock');
     $this->assertTrue(class_exists('Tests\\Lib\\Nimbles\\Core\\Loader\\Mock'), 'Mock class does not exist');
 }