function InstallTasksTest::testNameWithNoConnection
Same name and namespace in other branches
- 11.x core/modules/mysql/tests/src/Unit/InstallTasksTest.php \Drupal\Tests\mysql\Unit\InstallTasksTest::testNameWithNoConnection()
- 10 core/modules/mysql/tests/src/Unit/InstallTasksTest.php \Drupal\Tests\mysql\Unit\InstallTasksTest::testNameWithNoConnection()
- 9 core/modules/mysql/tests/src/Unit/InstallTasksTest.php \Drupal\Tests\mysql\Unit\InstallTasksTest::testNameWithNoConnection()
Tests name with no connection.
See also
::name
File
-
core/
modules/ mysql/ tests/ src/ Unit/ InstallTasksTest.php, line 82
Class
- InstallTasksTest
- Tests the MySQL install tasks.
Namespace
Drupal\Tests\mysql\UnitCode
public function testNameWithNoConnection() : void {
$tasks = $this->getMockBuilder(Tasks::class)
->onlyMethods([
't',
'isConnectionActive',
])
->getMock();
$tasks->expects($this->once())
->method('isConnectionActive')
->willReturn(FALSE);
$tasks->expects($this->once())
->method('t')
->willReturnArgument(0);
$this->assertSame('MySQL, MariaDB, or equivalent', $tasks->name());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.