PhpBench\Tests\Benchmark\RunnerTest::testRunner PHP Method

testRunner() public method

- With 1 iteration, 1 revolution - With 1 iteration, 4 revolutions
public testRunner ( $iterations, $revs, array $parameters, $assertionCallbacks )
$parameters array
    public function testRunner($iterations, $revs, array $parameters, $assertionCallbacks)
    {
        $subject = new SubjectMetadata($this->benchmark->reveal(), 'name', 0);
        $subject->setIterations($iterations);
        $subject->setBeforeMethods(['beforeFoo']);
        $subject->setParameterSets([[$parameters]]);
        $subject->setRevs($revs);
        TestUtil::configureBenchmarkMetadata($this->benchmark);
        $this->benchmark->getSubjects()->willReturn([$subject]);
        $this->executor->execute(Argument::type('PhpBench\\Benchmark\\Metadata\\SubjectMetadata'), Argument::type('PhpBench\\Model\\Iteration'), new Config('test', ['executor' => 'microtime']))->shouldBeCalledTimes(count($revs) * array_sum($iterations))->will($this->loadIterationResultCallback());
        $suite = $this->runner->run(new RunnerContext(__DIR__, ['context_name' => 'context']));
        $this->assertInstanceOf('PhpBench\\Model\\Suite', $suite);
        $this->assertNoErrors($suite);
        foreach ($assertionCallbacks as $callback) {
            $callback($this, $suite);
        }
    }