Ejemplo n.º 1
0
 public function testGetContent()
 {
     $Request = new Request(self::$_urlJSON . '&test=testGetContent');
     $Request->setPost(array('key1' => 'val1'));
     $body = $Request->send();
     $Request->getHeader();
     $arContentJSON = json_decode($body, true);
     $this->assertTrue(is_array($arContentJSON));
     $this->assertArrayHasKey('get', $arContentJSON);
     $this->assertArrayHasKey('test', $arContentJSON['get']);
     $this->assertEquals('testGetContent', $arContentJSON['get']['test']);
     $this->assertArrayHasKey('post', $arContentJSON);
     $this->assertArrayHasKey('key1', $arContentJSON['post']);
     $this->assertEquals('val1', $arContentJSON['post']['key1']);
 }