function DatabaseBackendFactoryTest::testGet

Tests get.

@legacy-covers ::__construct @legacy-covers ::get

Attributes

#[DataProvider('getProvider')]

File

core/tests/Drupal/Tests/Core/Cache/DatabaseBackendFactoryTest.php, line 32

Class

DatabaseBackendFactoryTest
Tests Drupal\Core\Cache\DatabaseBackendFactory.

Namespace

Drupal\Tests\Core\Cache

Code

public function testGet(array $settings, $expected_max_rows_foo, $expected_max_rows_bar) : void {
  $database_backend_factory = new DatabaseBackendFactory($this->prophesize(Connection::class)
    ->reveal(), $this->prophesize(CacheTagsChecksumInterface::class)
    ->reveal(), new Settings($settings), new PhpSerialize(), $this->prophesize(TimeInterface::class)
    ->reveal());
  $this->assertSame($expected_max_rows_foo, $database_backend_factory->get('foo')
    ->getMaxRows());
  $this->assertSame($expected_max_rows_bar, $database_backend_factory->get('bar')
    ->getMaxRows());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.