PhpBench\Benchmark\RunnerContext::getParameterSets PHP Method

getParameterSets() public method

Override parameters.
public getParameterSets ( $default = null ) : mixed[]
return mixed[]
    public function getParameterSets($default = null)
    {
        $parameters = $this->options['parameters'] ? [[$this->options['parameters']]] : $default;
        if (!$parameters) {
            return [[[]]];
        }
        return $parameters;
    }

Usage Example

示例#1
0
 /**
  * The overridden parameter sets should be nested in an array of an array.
  */
 public function testGetParameterSets()
 {
     $context = new RunnerContext(__DIR__, array('parameters' => array('nb_elements' => 10)));
     $this->assertEquals(array(array(array('nb_elements' => 10))), $context->getParameterSets(array(array('nb_elements' => 100))));
 }
All Usage Examples Of PhpBench\Benchmark\RunnerContext::getParameterSets