Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / tests / Drupal / Tests / Traits / Core / Config / SchemaConfigListenerTestTrait.php
index 5a73cad4bbfba8943eb4681de79c9b40dde83ce8..b399990af3f6064d4a7441b40d3068a3f9db7e36 100644 (file)
@@ -35,6 +35,19 @@ trait SchemaConfigListenerTestTrait {
       $this->fail($message);
     }
 
+    // Test a valid schema, where the value is accessed before saving. Ensures
+    // that overridden data is correctly reset after casting.
+    $message = 'Unexpected SchemaIncompleteException thrown';
+    $config = $this->config('config_test.types')->set('int', '10');
+    $config->get('int');
+    try {
+      $config->save();
+      $this->pass($message);
+    }
+    catch (SchemaIncompleteException $e) {
+      $this->fail($message);
+    }
+
     // Test an invalid schema.
     $message = 'Expected SchemaIncompleteException thrown';
     $config = $this->config('config_test.types')