Commit 9d92bf81 authored by webchick's avatar webchick

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

parent 40c8a035
......@@ -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.'));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment