mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Merge pull request #596 from jim-parry/test/format
Additional JSONFormatter test
This commit is contained in:
commit
c0a6e27a91
@ -49,4 +49,15 @@ class JSONFormatterTest extends \CIUnitTestCase
|
||||
$this->assertEquals($expected, $this->jsonFormatter->format($data));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @expectedException RuntimeException
|
||||
*/
|
||||
public function testJSONError()
|
||||
{
|
||||
$data = ["\xB1\x31"];
|
||||
$expected = "Boom";
|
||||
$this->assertEquals($expected, $this->jsonFormatter->format($data));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user