Example #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();
Example #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());
 }
Example #3
0
 public function testNoFile()
 {
     $this->setExpectedException('RuntimeException');
     $this->object->registerNamespace('Mock', __DIR__ . '/../');
     $this->object->loadClass('Mock\\Mock2.php');
 }