function SerializeQueryTest::testSerializeQuery
Same name and namespace in other branches
- 11.x core/tests/Drupal/KernelTests/Core/Database/SerializeQueryTest.php \Drupal\KernelTests\Core\Database\SerializeQueryTest::testSerializeQuery()
- 10 core/tests/Drupal/KernelTests/Core/Database/SerializeQueryTest.php \Drupal\KernelTests\Core\Database\SerializeQueryTest::testSerializeQuery()
- 9 core/tests/Drupal/KernelTests/Core/Database/SerializeQueryTest.php \Drupal\KernelTests\Core\Database\SerializeQueryTest::testSerializeQuery()
- 8.9.x core/tests/Drupal/KernelTests/Core/Database/SerializeQueryTest.php \Drupal\KernelTests\Core\Database\SerializeQueryTest::testSerializeQuery()
Confirms that a query cannot be serialized.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Database/ SerializeQueryTest.php, line 20
Class
- SerializeQueryTest
- Tests serializing and unserializing a query.
Namespace
Drupal\KernelTests\Core\DatabaseCode
public function testSerializeQuery() : void {
$query = $this->connection
->select('test');
$this->expectException(\LogicException::class);
$this->expectExceptionMessage('Database query objects are not serializable');
serialize($query);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.