src/Behat/Gherkin/Loader/ArrayLoader.php
protected function loadFeatureHash(array $hash, $line = 0)
    {
        $hash = array_merge(
            array(
                'title' => null,
                'description' => null,
                'tags' => array(),
                'keyword' => 'Feature',
                'language' => 'en',
                'line' => $line,
                'scenarios' => array(),
            ),
            $hash
        );
        $background = isset($hash['background']) ? $this->loadBackgroundHash($hash['background']) : null;

        $scenarios = array();
        foreach ((array) $hash['scenarios'] as $scenarioIterator => $scenarioHash) {
            if (isset($scenarioHash['type']) && 'outline' === $scenarioHash['type']) {
                $scenarios[] = $this->loadOutlineHash($scenarioHash, $scenarioIterator);
            } else {
                $scenarios[] = $this->loadScenarioHash($scenarioHash, $scenarioIterator);
            }
        }

        return new FeatureNode($hash['title'], $hash['description'], $hash['tags'], $background, $scenarios, $hash['keyword'], $hash['language'], null, $hash['line']);
    }
protected function loadFeatureHash(array $hash, $line = 0)
    {
        $hash = array_merge(
            array(
                'title' => null,
                'description' => null,
                'tags' => array(),
                'keyword' => 'Feature',
                'language' => 'en',
                'line' => $line,
                'scenarios' => array(),
            ),
            $hash
        );
        $background = isset($hash['background']) ? $this->loadBackgroundHash($hash['background']) : null;

        $scenarios = array();
        foreach ((array) $hash['scenarios'] as $scenarioIterator => $scenarioHash) {
            if (isset($scenarioHash['type']) && 'outline' === $scenarioHash['type']) {
                $scenarios[] = $this->loadOutlineHash($scenarioHash, $scenarioIterator);
            } else {
                $scenarios[] = $this->loadScenarioHash($scenarioHash, $scenarioIterator);
            }
        }

        return new FeatureNode($hash['title'], $hash['description'], $hash['tags'], $background, $scenarios, $hash['keyword'], $hash['language'], null, $hash['line']);
    }
protected function loadFeatureHash ( array $ hash , $ line = 0 ) { $ hash = array_merge ( array ( 'title' => null , 'description' => null , 'tags' => array ( ) , 'keyword' => 'Feature' , 'language' => 'en' , 'line' => $ line , 'scenarios' => array ( ) , ) , $ hash ) ; $ background = isset ( $ hash [ 'background' ] ) ? $ this -> loadBackgroundHash ( $ hash [ 'background' ] ) : null ; $ scenarios = array ( ) ; foreach ( ( array ) $ hash [ 'scenarios' ] as $ scenarioIterator => $ scenarioHash ) { if ( isset ( $ scenarioHash [ 'type' ] ) && 'outline' === $ scenarioHash [ 'type' ] ) { $ scenarios [ ] = $ this -> loadOutlineHash ( $ scenarioHash , $ scenarioIterator ) ; } else { $ scenarios [ ] = $ this -> loadScenarioHash ( $ scenarioHash , $ scenarioIterator ) ; } } return new FeatureNode ( $ hash [ 'title' ] , $ hash [ 'description' ] , $ hash [ 'tags' ] , $ background , $ scenarios , $ hash [ 'keyword' ] , $ hash [ 'language' ] , null , $ hash [ 'line' ] ) ; }
Loads feature from provided feature hash.

@param array   $hash Feature hash
@param integer $line

@return FeatureNode
Loads feature from provided feature hash .