public function DatabaseBackendFactoryTest::testGet in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Cache/DatabaseBackendFactoryTest.php \Drupal\Tests\Core\Cache\DatabaseBackendFactoryTest::testGet()
- 9 core/tests/Drupal/Tests/Core/Cache/DatabaseBackendFactoryTest.php \Drupal\Tests\Core\Cache\DatabaseBackendFactoryTest::testGet()
@covers ::__construct @covers ::get @dataProvider getProvider
File
- core/
tests/ Drupal/ Tests/ Core/ Cache/ DatabaseBackendFactoryTest.php, line 23
Class
- DatabaseBackendFactoryTest
- @coversDefaultClass \Drupal\Core\Cache\DatabaseBackendFactory @group Cache
Namespace
Drupal\Tests\Core\CacheCode
public function testGet(array $settings, $expected_max_rows_foo, $expected_max_rows_bar) {
$database_backend_factory = new DatabaseBackendFactory($this
->prophesize(Connection::class)
->reveal(), $this
->prophesize(CacheTagsChecksumInterface::class)
->reveal(), new Settings($settings));
$this
->assertSame($expected_max_rows_foo, $database_backend_factory
->get('foo')
->getMaxRows());
$this
->assertSame($expected_max_rows_bar, $database_backend_factory
->get('bar')
->getMaxRows());
}