function InstallTasksTest::createTasksNoConnection
Creates a Tasks object for testing, without connection.
Return value
\Drupal\mysql\Driver\Database\mysql\Install\Tasks A Tasks object.
1 call to InstallTasksTest::createTasksNoConnection()
- InstallTasksTest::testNameWithNoConnection in core/
modules/ mysql/ tests/ src/ Unit/ InstallTasksTest.php - Tests name with no connection.
File
-
core/
modules/ mysql/ tests/ src/ Unit/ InstallTasksTest.php, line 90
Class
- InstallTasksTest
- Tests the MySQL install tasks.
Namespace
Drupal\Tests\mysql\UnitCode
private function createTasksNoConnection() : Tasks {
return new class extends Tasks {
/**
* {@inheritdoc}
*/
protected function isConnectionActive() {
return FALSE;
}
/**
* {@inheritdoc}
*/
protected function getConnection() {
return NULL;
}
/**
* {@inheritdoc}
*/
protected function t($string, array $args = [], array $options = []) {
return $string;
}
};
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.