/**
* Tests deprecation of the 'return' query option.
*
* @covers ::query
* @covers ::prepareStatement
*
* @group legacy
*/
public function testReturnOptionDeprecation() { $this->
expectDeprecation('Passing "return" option to %Aquery() is deprecated in drupal:9.4.0 and is removed in drupal:11.0.0. For data manipulation operations, use dynamic queries instead. See https://www.drupal.org/node/3185520'
);
$this->
expectDeprecation('Passing "return" option to %AprepareStatement() is deprecated in drupal:9.4.0 and is removed in drupal:11.0.0. For data manipulation operations, use dynamic queries instead. See https://www.drupal.org/node/3185520'
);
$this->
assertIsInt((int) $this->connection->
query('INSERT INTO {test} ([name], [age], [job]) VALUES (:name, :age, :job)',
[ ':name' => 'Magoo',
':age' => 56,
':job' => 'Driver',
],
['return' => Database::RETURN_INSERT_ID
]));
}}