<?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();
public function testLoadClass() { $this->object->registerNamespace('Mock', __DIR__ . '/'); $this->object->loadClass('Mock\\Mock'); $this->assertContains(realpath(__DIR__ . '/Mock') . '/Mock.php', \get_included_files()); }
public function testNoFile() { $this->setExpectedException('RuntimeException'); $this->object->registerNamespace('Mock', __DIR__ . '/../'); $this->object->loadClass('Mock\\Mock2.php'); }