PhpBench\Extensions\Dbal\Tests\Functional\Storage\Driver\Dbal\RepositoryTest::testHistoryStatement PHP Method

testHistoryStatement() public method

It should return the history statement.
    public function testHistoryStatement()
    {
        $suiteCollection = new SuiteCollection([TestUtil::createSuite(['uuid' => 1, 'env' => ['vcs' => ['system' => 'git', 'branch' => 'branch_1']], 'name' => 'one', 'date' => '2016-01-01']), TestUtil::createSuite(['uuid' => 2, 'date' => '2015-01-01', 'env' => ['vcs' => ['system' => 'git', 'branch' => 'branch_2']], 'name' => 'two'])]);
        $this->persister->persist($suiteCollection);
        $statement = $this->repository->getHistoryStatement();
        $rows = $statement->fetchAll(\PDO::FETCH_ASSOC);
        $this->assertEquals([['run_date' => '2016-01-01 00:00:00', 'context' => 'one', 'vcs_branch' => 'branch_1', 'run_uuid' => 1, 'nb_subjects' => '1', 'nb_iterations' => '2', 'nb_revolutions' => '5', 'min_time' => '2.0', 'max_time' => '4.0', 'mean_time' => '3.0', 'mean_rstdev' => '33.333333333333', 'total_time' => '6.0'], ['run_date' => '2015-01-01 00:00:00', 'context' => 'two', 'vcs_branch' => 'branch_2', 'run_uuid' => 2, 'nb_subjects' => '1', 'nb_iterations' => '2', 'nb_revolutions' => '5', 'min_time' => '2.0', 'max_time' => '4.0', 'mean_time' => '3.0', 'mean_rstdev' => '33.333333333333', 'total_time' => '6.0']], $rows);
    }