예제 #1
0
 public function testSplAutoloaderExistence()
 {
     Juriya::registerAutoloader();
     $autoloaders = spl_autoload_functions();
     $isJuriyaAutoloaderexists = FALSE;
     foreach ($autoloaders as $autoloader) {
         if (is_array($autoloader) && count($autoloader) == 2) {
             $class = current($autoloader);
             next($autoloader);
             $function = current($autoloader);
             if ($class == 'Juriya\\Juriya' && $function == 'autoload') {
                 $isJuriyaAutoloaderexists = TRUE;
                 break;
             }
         }
     }
     $this->assertTrue($isJuriyaAutoloaderexists);
 }
예제 #2
0
<?php

require_once realpath(__DIR__ . '/../Juriya.php');
use Juriya\Juriya;
Juriya::registerAutoloader();
Juriya::reset();
$launcher = new Juriya();
$launcher->setEnvironment('test');