示例#1
0
<?php

/**
 * This bootstraps the library
 *
 * PHP version 5.3
 *
 * @category   CkanConsumer
 * @author     Pieter Hordijk <*****@*****.**>
 * @copyright  Copyright (c) 2013 Pieter Hordijk
 * @license    http://www.opensource.org/licenses/mit-license.html  MIT License
 * @version    1.0.0
 */
namespace CkanConsumer;

use CkanConsumer\Common\Autoloader;
require_once __DIR__ . '/src/CkanConsumer/Common/Autoloader.php';
$autoloader = new Autoloader(__NAMESPACE__, __DIR__ . '/src');
$autoloader->register();
示例#2
0
 /**
  * @covers CkanConsumer\Common\Autoloader::__construct
  * @covers CkanConsumer\Common\Autoloader::register
  * @covers CkanConsumer\Common\Autoloader::load
  * @covers CkanConsumer\Common\Autoloader::getPath
  */
 public function testLoadUnknownClassStacked()
 {
     $autoloader = new Autoloader('OtherFakeProject', dirname(__DIR__) . '/../Mocks/Common\\\\/\\//');
     $this->assertTrue($autoloader->register());
     $autoloader = new Autoloader('FakeProject', dirname(__DIR__) . '/../Mocks/Common\\\\/\\//');
     $this->assertTrue($autoloader->register());
     $this->assertNull($autoloader->load('IDontExistClass'));
 }