We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d7bc121 commit 56fa534Copy full SHA for 56fa534
1 file changed
tests/system/EntityTest.php
@@ -504,6 +504,20 @@ public function testCastAsJSONControlCharCheck()
504
505
$method($string, true);
506
}
507
+
508
+ public function testCastAsJSONStateMismatch()
509
+ {
510
+ $entity = new Entity();
511
512
+ $method = $this->getPrivateMethodInvoker($entity,'castAsJson');
513
514
+ $this->expectException(CastException::class);
515
+ $this->expectExceptionMessage('Underflow or the modes mismatch');
516
517
+ $string = '[{"name":"jack","product_id":"1234"]';
518
519
+ $method($string, true);
520
+ }
521
//--------------------------------------------------------------------
522
523
public function testAsArray()
0 commit comments