function TestDatabaseTest::testConstructorNullPrefix
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php \Drupal\Tests\Core\Test\TestDatabaseTest::testConstructorNullPrefix()
- 10 core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php \Drupal\Tests\Core\Test\TestDatabaseTest::testConstructorNullPrefix()
- 11.x core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php \Drupal\Tests\Core\Test\TestDatabaseTest::testConstructorNullPrefix()
Verify that a test lock is generated if there is no provided prefix.
@covers ::__construct
File
-
core/
tests/ Drupal/ Tests/ Core/ Test/ TestDatabaseTest.php, line 54
Class
- TestDatabaseTest
- @coversDefaultClass \Drupal\Core\Test\TestDatabase
Namespace
Drupal\Tests\Core\TestCode
public function testConstructorNullPrefix() {
// We use a stub class here because we can't mock getTestLock() so that it's
// available before the constructor is called.
$test_db = new TestTestDatabase(NULL);
$this->assertEquals('test23', $test_db->getDatabasePrefix());
$this->assertEquals('sites/simpletest/23', $test_db->getTestSitePath());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.