public function TestDatabaseTest::testConstructor in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php \Drupal\Tests\Core\Test\TestDatabaseTest::testConstructor()
- 10 core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php \Drupal\Tests\Core\Test\TestDatabaseTest::testConstructor()
@covers ::__construct @covers ::getDatabasePrefix @covers ::getTestSitePath
@dataProvider providerTestConstructor
File
- core/
tests/ Drupal/ Tests/ Core/ Test/ TestDatabaseTest.php, line 33
Class
- TestDatabaseTest
- @coversDefaultClass \Drupal\Core\Test\TestDatabase
Namespace
Drupal\Tests\Core\TestCode
public function testConstructor($db_prefix, $expected_db_prefix, $expected_site_path) {
$test_db = new TestDatabase($db_prefix);
$this
->assertEquals($expected_db_prefix, $test_db
->getDatabasePrefix());
$this
->assertEquals($expected_site_path, $test_db
->getTestSitePath());
}