PhpBench\Extensions\Dbal\Tests\Functional\Storage\Driver\Dbal\PeristerTest::testPersist PHP Метод

testPersist() публичный Метод

The loader should load the collection from an Dbal database. The collection retrieved from the loader should be equal to the collection passed to the persister.
public testPersist ( )
    public function testPersist()
    {
        $suiteCollection = new SuiteCollection([TestUtil::createSuite(['uuid' => '1', 'subjects' => ['benchOne', 'benchTwo'], 'groups' => ['one', 'two'], 'parameters' => ['one' => 'two', 'three' => ['one', 'two']], 'env' => ['system' => ['os' => 'linux', 'memory' => 8096, 'distribution' => 'debian'], 'vcs' => ['system' => 'git', 'branch' => 'foo']]]), TestUtil::createSuite(['uuid' => '2', 'subjects' => ['benchThree'], 'groups' => ['five']])]);
        $this->persister->persist($suiteCollection);
        $this->assertEquals(2, $this->sqlCount('SELECT * FROM run'));
        $this->assertEquals(3, $this->sqlCount('SELECT * FROM subject'));
        $this->assertEquals(6, $this->sqlCount('SELECT * FROM iteration'));
        $this->assertEquals(5, $this->sqlCount('SELECT * FROM environment'));
        $this->assertEquals(5, $this->sqlCount('SELECT * FROM sgroup_subject'));
        $this->assertEquals(3, $this->sqlCount('SELECT * FROM parameter'));
    }