Explorar o código

Add test for escape sequences

Jordi Boggiano %!s(int64=12) %!d(string=hai) anos
pai
achega
b4d691e46d
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      tests/Composer/Test/Json/JsonManipulatorTest.php

+ 3 - 1
tests/Composer/Test/Json/JsonManipulatorTest.php

@@ -400,9 +400,11 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
 }');
 
         $this->assertTrue($manipulator->addConfigSetting('test', 'a\b'));
+        $this->assertTrue($manipulator->addConfigSetting('test2', "a\nb\fa"));
         $this->assertEquals('{
     "config": {
-        "test": "a\\\\b"
+        "test": "a\\\\b",
+        "test2": "a\nb\fa"
     }
 }
 ', $manipulator->getContents());