public function UpdateTest::testNamespaceConditionObject in Drupal driver for SQL Server and SQL Azure 4.2.x
Same name and namespace in other branches
- 8.2 tests/src/Kernel/UpdateTest.php \Drupal\Tests\sqlsrv\Kernel\UpdateTest::testNamespaceConditionObject()
- 3.0.x tests/src/Kernel/UpdateTest.php \Drupal\Tests\sqlsrv\Kernel\UpdateTest::testNamespaceConditionObject()
- 3.1.x tests/src/Kernel/UpdateTest.php \Drupal\Tests\sqlsrv\Kernel\UpdateTest::testNamespaceConditionObject()
- 4.0.x tests/src/Kernel/UpdateTest.php \Drupal\Tests\sqlsrv\Kernel\UpdateTest::testNamespaceConditionObject()
- 4.1.x tests/src/Kernel/UpdateTest.php \Drupal\Tests\sqlsrv\Kernel\UpdateTest::testNamespaceConditionObject()
Tests namespace of the condition object.
File
- tests/
src/ Kernel/ UpdateTest.php, line 26
Class
- UpdateTest
- Tests the update query builder.
Namespace
Drupal\Tests\sqlsrv\KernelCode
public function testNamespaceConditionObject() {
$namespace = (new \ReflectionObject($this->connection))
->getNamespaceName() . "\\Condition";
$update = $this->connection
->update('test');
$reflection = new \ReflectionObject($update);
$condition_property = $reflection
->getProperty('condition');
$condition_property
->setAccessible(TRUE);
$this
->assertSame($namespace, get_class($condition_property
->getValue($update)));
$nested_and_condition = $update
->andConditionGroup();
$this
->assertSame($namespace, get_class($nested_and_condition));
$nested_or_condition = $update
->orConditionGroup();
$this
->assertSame($namespace, get_class($nested_or_condition));
}