function ConditionTest::testContribCondition
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Database/ConditionTest.php \Drupal\Tests\Core\Database\ConditionTest::testContribCondition()
- 8.9.x core/tests/Drupal/Tests/Core/Database/ConditionTest.php \Drupal\Tests\Core\Database\ConditionTest::testContribCondition()
- 10 core/tests/Drupal/Tests/Core/Database/ConditionTest.php \Drupal\Tests\Core\Database\ConditionTest::testContribCondition()
Tests that the core Condition can be overridden.
File
-
core/
tests/ Drupal/ Tests/ Core/ Database/ ConditionTest.php, line 191
Class
- ConditionTest
- @coversDefaultClass \Drupal\Core\Database\Query\Condition
Namespace
Drupal\Tests\Core\DatabaseCode
public function testContribCondition() : void {
$connection = new StubConnection($this->createMock(StubPDO::class), [
'namespace' => 'Drupal\\mock\\Driver\\Database\\mock',
'prefix' => '',
]);
$condition = $connection->condition('AND');
$this->assertSame(StubCondition::class, get_class($condition));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.