'name' => 'Tiffany',
]) ->
execute();
$this->
fail('Upsert query should have failed.'
);
} catch (\Exception
$e) { // Just continue testing.
} // Create the missing schema and insert a row.
$this->
installSchema('database_test',
['test'
]);
$this->connection->
insert('test'
) ->
fields([ 'name' => 'David',
'age' => '24',
]) ->
execute();
// Commit the transaction.
unset($transaction);
$saved_age =
$this->connection->
query('SELECT [age] FROM {test} WHERE [name] = :name',
[':name' => 'David'
])->
fetchField();