$this->expectExceptionMessageIs('Schema errors for field.storage.entity_test.field_int with the following errors: 0 [cardinality] The field 'field_int' of entity type 'entity_test' has more entries (2) than the cardinality (1) allows');
$this->expectExceptionMessageIs('Schema errors for field.storage.entity_test.field_int with the following errors: 0 [cardinality] The field 'field_int' of entity type 'entity_test' has more entries (2) than the cardinality (1) allows.');
Changes for core/tests/Drupal/KernelTests/Core/Database/SerializeQueryTest.php: 2 added lines, 2 removed lines.
Original line number
Diff line number
Diff line
@@ -20,7 +20,7 @@ class SerializeQueryTest extends DatabaseTestBase {
publicfunctiontestSerializeQuery():void{
$query=$this->connection->select('test');
$this->expectException(\LogicException::class);
$this->expectExceptionMessage('Database query objects are not serializable');
$this->expectExceptionMessageIs('Database query objects are not serializable. This probably means you are serializing an object that has a reference to a query object. Adjust your code so that is not necessary, for example by storing the query arguments or results instead.');
serialize($query);
}
@@ -30,7 +30,7 @@ public function testSerializeQuery(): void {
$this->expectExceptionMessage('Drupal\Core\Plugin\DefaultPluginManager only supports annotation-based discovery, which is no longer supported as of Drupal 12.0. Provide an Attribute class and an Annotation class for BC. See https://www.drupal.org/node/3395582');
$this->expectExceptionMessageIs('Drupal\Core\Plugin\DefaultPluginManager only supports annotation-based discovery, which is no longer supported as of Drupal 12.0. Provide an Attribute class and an Annotation class for BC. See https://www.drupal.org/node/3395582');