mageekguy\atoum\runner::setAutoloaderFile PHP Method

setAutoloaderFile() public method

public setAutoloaderFile ( $path )
    public function setAutoloaderFile($path)
    {
        try {
            $this->includer->includePath($path, function ($path) {
                include_once $path;
            });
        } catch (includer\exception $exception) {
            throw new exceptions\runtime\file(sprintf($this->getLocale()->_('Unable to use autoloader file \'%s\''), $path));
        }
        $this->autoloaderFile = $path;
        return $this;
    }

Usage Example

示例#1
0
文件: runner.php 项目: atoum/atoum
 public function testGetAutoloaderFile()
 {
     $this->if($runner = new testedClass())->and($includer = new \mock\mageekguy\atoum\includer())->and($includer->getMockController()->includePath = function () {
     })->and($runner->setIncluder($includer))->then->object($runner->setAutoloaderFile($path = uniqid()))->isIdenticalTo($runner)->string($runner->getAutoloaderFile())->isEqualTo($path)->mock($includer)->call('includePath')->withArguments($path)->once();
 }
runner