Skip to content

Commit a534923

Browse files
committed
Add test case for Escaped JSON Issue #276
1 parent dcb2088 commit a534923

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/Tests.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,4 +634,13 @@ public function testVarBinaryBarcodes()
634634
$test->get('/barcodes?transform=1');
635635
$test->expect('{"barcodes":[{"id":1,"product_id":1,"hex":"00ff01","bin":"AP8B"}]}');
636636
}
637+
638+
public function testEditPostWithApostrophe()
639+
{
640+
$test = new Api($this);
641+
$test->put('/posts/1', '[{"id":1,"user_id":1,"category_id":1,"content":"blog start\'d"}]');
642+
$test->expect('1');
643+
$test->get('/posts/1');
644+
$test->expect('{"id":1,"user_id":1,"category_id":1,"content":"blog start\'d"}');
645+
}
637646
}

0 commit comments

Comments
 (0)