#!/usr/bin/env php phalApiCUrl = new PhalApi_CUrl(3); } protected function tearDown() { } /** * @group testGet */ public function testGet() { $url = 'http://phalapi.oschina.mopaas.com/Public/demo/'; $timeoutMs = 1000; $rs = $this->phalApiCUrl->get($url, $timeoutMs); //var_dump($rs); $this->assertTrue(is_string($rs)); } /** * @group testPost */ public function testPost() { $url = 'http://phalapi.oschina.mopaas.com/Public/demo/'; $data = array('username' => 'phalapi'); $timeoutMs = 1000; $rs = $this->phalApiCUrl->post($url, $data, $timeoutMs); $this->assertTrue(is_string($rs)); } }