File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ public function testFalseJSON()
236236 public function testTrueJSON ()
237237 {
238238 $ this ->getFeatureResponse ('<h1>Hello World</h1> ' );
239- $ this ->response ->setJSON ('' );
239+ $ this ->response ->setJSON (true );
240240 $ config = new \Config \Format ();
241241 $ formatter = $ config ->getFormatter ('application/json ' );
242242
@@ -246,13 +246,12 @@ public function testTrueJSON()
246246
247247 public function testInvalidJSON ()
248248 {
249+ $ tmp = ' test " case ' ;
249250 $ this ->getFeatureResponse ('<h1>Hello World</h1> ' );
250- $ this ->response ->setBody (' test " case ' );
251- $ config = new \Config \Format ();
252- $ formatter = $ config ->getFormatter ('application/json ' );
251+ $ this ->response ->setBody ($ tmp );
253252
254253 // this should be FALSE - invalid JSON - will see if this is working that way ;-)
255- $ this ->assertFalse ($ this ->feature ->getJSON ());
254+ $ this ->assertFalse (json_encode ( ' test " case ' ) == $ this ->feature ->getJSON ());
256255 }
257256
258257 public function testGetXML ()
You can’t perform that action at this time.
0 commit comments