function TransactionTest::testMockTransaction
Tests that mocking transactions works fine.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Database/ TransactionTest.php, line 1282
Class
- TransactionTest
- Tests the transactions, using the explicit ::commitOrRelease method.
Namespace
Drupal\KernelTests\Core\DatabaseCode
public function testMockTransaction() : void {
$connection = $this->getMockBuilder(Connection::class)
->disableOriginalConstructor()
->getMock();
$this->getMockBuilder(Transaction::class)
->setConstructorArgs([
$connection,
'',
'',
])
->getMock();
$this->assertTrue(TRUE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.