# HTTP Mock for PHP
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/InterNations/http-mock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/InterNations/http-mock.svg)](https://travis-ci.org/InterNations/http-mock) [![Dependency Status](https://www.versioneye.com/user/projects/53479c42fe0d0720b500006a/badge.png)](https://www.versioneye.com/user/projects/53479c42fe0d0720b500006a) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/InterNations/http-mock.svg)](http://isitmaintained.com/project/InterNations/http-mock "Average time to resolve an issue") [![Percentage of issues still open](http://isitmaintained.com/badge/open/InterNations/http-mock.svg)](http://isitmaintained.com/project/InterNations/http-mock "Percentage of issues still open")
Mock HTTP requests on the server side in your PHP unit tests.
HTTP Mock for PHP mocks the server side of an HTTP request to allow integration testing with the HTTP side.
It uses PHP’s builtin web server to start a second process that handles the mocking. The server allows
registering request matcher and responses from the client side.
*BIG FAT WARNING:* software like this is inherently insecure. Only use in trusted, controlled environments.
## Usage
Read the [docs](doc/index.md)
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
使用前请仔细阅读工具使用指南: 1、安装jdk1.6以上的版本; 2、GUI包含三部分,端口设置,URL和response文件路径设置,控制台; 3、端口设置为需要监听的本地的端口,范围是1-65532; 4、URL和response文件路径设置是一个2列9行的表格,每行包括两个配置,两个配置从名字上都很好理解,填写正确即可; 5、注意:当输入完成后,需要点击表格的其他行取消鼠标焦点,这样工具才能识别到当前的输入框被修改,OSX系统下复制粘贴的快捷键依然是ctr+c/v; 6、控制台分为两部分,三个按钮和一个文本显示区域,按钮的作用从名称上都能理解,文本显示区域显示收到的HTTP请求的URL,头域,消息体,右击有清空按钮; 7、需要监听多个端口复制多个jar文件打开即可。
资源推荐
资源详情
资源评论
收起资源包目录
[示例][PHP]http-mock-master模拟HTTP请求库.zip (45个子文件)
http-mock-master
composer.json 971B
.travis.yml 293B
build.xml 1KB
tests
PHPUnit
HttpMockPHPUnitIntegrationBasePathTest.php 1KB
HttpMockMultiPHPUnitIntegrationTest.php 10KB
HttpMockPHPUnitIntegrationTest.php 11KB
RequestCollectionFacadeTest.php 7KB
MockBuilderIntegrationTest.php 4KB
Fixtures
Request.php 354B
Matcher
ExtractorFactoryTest.php 2KB
AppIntegrationTest.php 8KB
Request
UnifiedRequestTest.php 4KB
LICENSE 1KB
src
RequestStorage.php 1KB
PHPUnit
HttpMockTrait.php 2KB
ServerManager.php 1KB
HttpMockFacade.php 2KB
HttpMockFacadeMap.php 2KB
MockBuilder.php 2KB
ResponseBuilder.php 1KB
Matcher
MatcherInterface.php 281B
ExtractorFactory.php 1KB
MatcherFactory.php 377B
RegexMatcher.php 413B
ClosureMatcher.php 324B
AbstractMatcher.php 1010B
StringMatcher.php 406B
RequestCollectionFacade.php 4KB
Util.php 543B
app.php 7KB
Response
CallbackResponse.php 531B
Server.php 3KB
Request
UnifiedRequest.php 7KB
Expectation.php 4KB
doc
stubbing.md 3KB
recording.md 1KB
start.md 2KB
server.md 1KB
index.md 269B
.gitignore 59B
phpunit.xml.dist 1KB
state
.gitkeep 0B
public
index.php 224B
README.md 1KB
build
.gitkeep 0B
共 45 条
- 1
资源评论
神仙别闹
- 粉丝: 2674
- 资源: 7640
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功