\PhalApi_Helper_TestRunner

PhalApi_Helper_TestRunner - 快速接口执行 - 辅助类

  • 使用示例:

    public function testWhatever() {
    //Step 1. 构建请求URL
    $url = 'service=Default.Index&username=dogstar';
    
    //Step 2. 执行请求
    $rs = PhalApi_Helper_TestRunner::go($url);
    
    //Step 3. 验证
    $this->assertNotEmpty($rs);
    $this->assertArrayHasKey('code', $rs);
    $this->assertArrayHasKey('msg', $rs);
    }

Summary

Methods
Properties
Constants
go()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

go()

go(string  $url,   $params = array()) : array

Parameters

string $url

请求的链接

$params

Returns

array —

接口的返回结果