mageekguy\atoum\runner::setBootstrapFile PHP Method

setBootstrapFile() public method

public setBootstrapFile ( $path )
    public function setBootstrapFile($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 bootstrap file \'%s\''), $path));
        }
        $this->bootstrapFile = $path;
        return $this;
    }

Usage Example

示例#1
0
 public function testGetBootstrapFile()
 {
     $this->if($runner = new testedClass())->and($includer = new \mock\mageekguy\atoum\includer())->and($includer->getMockController()->includePath = function () {
     })->and($runner->setIncluder($includer))->then->object($runner->setBootstrapFile($path = uniqid()))->isIdenticalTo($runner)->string($runner->getBootstrapFile())->isEqualTo($path)->mock($includer)->call('includePath')->withArguments($path)->once();
 }
runner