Skip to content

Commit 897a572

Browse files
authored
Update FeatureResponseTest.php
;-)
1 parent 69f9d69 commit 897a572

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

tests/system/Test/FeatureResponseTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff 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()

0 commit comments

Comments
 (0)