Behat\Gherkin\Gherkin::setBasePath PHP Method

setBasePath() public method

Sets base features path.
public setBasePath ( string $path )
$path string Loaders base path
    public function setBasePath($path)
    {
        foreach ($this->loaders as $loader) {
            if ($loader instanceof FileLoaderInterface) {
                $loader->setBasePath($path);
            }
        }
    }

Usage Example

示例#1
0
 public function testSetBasePath()
 {
     $gherkin = new Gherkin();
     $gherkin->addLoader($loader1 = $this->getLoaderMock());
     $gherkin->addLoader($loader2 = $this->getLoaderMock());
     $loader1->expects($this->once())->method('setBasePath')->with($basePath = '/base/path')->will($this->returnValue(null));
     $loader2->expects($this->once())->method('setBasePath')->with($basePath = '/base/path')->will($this->returnValue(null));
     $gherkin->setBasePath($basePath);
 }
All Usage Examples Of Behat\Gherkin\Gherkin::setBasePath