Skip to content
Snippets Groups Projects
Commit 9d92bf81 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2463103 by amateescu: SQLite: Fix system\Tests\Entity\FieldSqlStorageTest

parent 40c8a035
No related branches found
No related tags found
No related merge requests found
......@@ -355,9 +355,13 @@ function testFieldUpdateFailure() {
));
$field_storage->save();
// Attempt to update the field in a way that would break the storage.
// Attempt to update the field in a way that would break the storage. The
// parenthesis suffix is needed because SQLite has *very* relaxed rules for
// data types, so we actually need to provide an invalid SQL syntax in order
// to break it.
// @see https://www.sqlite.org/datatype3.html
$prior_field_storage = $field_storage;
$field_storage->setSetting('max_length', -1);
$field_storage->setSetting('max_length', '-1)');
try {
$field_storage->save();
$this->fail(t('Update succeeded.'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment