示例#1
0
<?php

require_once __DIR__ . '/../vendor/autoload/src/Versionable/Autoload/Autoload.php';
use Versionable\Autoload\Autoload;
$al = new Autoload();
$al->registerNamespace('Versionable', __DIR__ . '/../src');
$al->register();
示例#2
0
 public function testLoadClass()
 {
     $this->object->registerNamespace('Mock', __DIR__ . '/');
     $this->object->loadClass('Mock\\Mock');
     $this->assertContains(realpath(__DIR__ . '/Mock') . '/Mock.php', \get_included_files());
 }
示例#3
0
 public function testNoFile()
 {
     $this->setExpectedException('RuntimeException');
     $this->object->registerNamespace('Mock', __DIR__ . '/../');
     $this->object->loadClass('Mock\\Mock2.php');
 }