public function testResponse() { $struct = array('foo' => 'bar', ' bar' => 'foo'); $res = new AetherJSONResponse($struct); $out = $res->get(); $this->assertEquals(json_encode($out), '{"foo":"bar"," bar":"foo"}'); }
public function testResponse() { $struct = array('foo' => 'bar', ' bar' => 'foo'); $res = new AetherJSONResponse($struct); $out = $res->get(); $this->assertTrue(strpos($out, '{"foo":"bar"," bar":"foo"}') !== false); $this->assertFalse(strpos($out, '*/') !== false); }