PHP code example of topphp / topphp-testing
1. Go to this page and download the library: Download topphp/topphp-testing library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
topphp / topphp-testing example snippets
单元测试文件只需要继承 HttpTestCase 即可通过如下方式调用http请求:
self::$httpClient->get("http://www.baidu.com");
bash
组件单元测试 ./vendor/bin/phpunit tests/ExampleTest.php