phake\Builder::load_runfile PHP Method

load_runfile() public method

public load_runfile ( $file )
    public function load_runfile($file)
    {
        if (!is_file($file)) {
            throw new \Exception('The given path to the Phakefile does not exist');
        }
        require_once __DIR__ . '/../functions.php';
        require_once __DIR__ . '/../term_colors.php';
        // set global reference for builder() helper as used in Phakefiles
        self::$global = $this;
        require $file;
    }

Usage Example

Example #1
0
    public function testGroups()
    {
        $builder = new Builder();
        $builder->load_runfile($this->getFixture('groups.php'));
        $this->expectOutputString(<<<EOF
a:b
b:a
y:z:a

EOF
);
        $builder->get_application()->invoke('default');
    }
All Usage Examples Of phake\Builder::load_runfile