think-testing
think-testing copied to clipboard
ThinkPHP 5 应用单元测试组件
>Problem 1 - topthink/think-testing v2.0.1 requires topthink/think-installer ~1.0 -> satisfiable by topthink/think-installer[1.0.1, v1.0.0, v1.0.10, v1.0.11, v1.0.12, v1.0.2, v1.0.3, v1.0.4, v1.0.5, v1.0.6, v1.0.7, v1.0.8, v1.0.9] but these conflict with your requirements...
第12行 ```JSON "topthink/think-installer": "~1.0", ``` 修改为 ```JSON "topthink/think-installer": "~2.0", ``` 并且打个 TAG ,这样 thinkphp5.1.x 单元测试就可以用了吧
为了使用PhpWord实现打开网页自动下载文件,我们在Controller中修改了header ` header("Content-type:application/vnd.ms-word"); header("Content-Disposition:attachment;filename=".$fileName.".docx"); header('Cache-Control:max-age=0'); ` 然后发现单元测试中使用$this->visit()方法的时候会报错并提示返回了一个500的状态码,这个Controller测试的方法本身没有问题,功能正常,检测的返回状态码也是200,想请问一下修改header的情况是不是需要做额外操作 @liu21st
运行 报 not support redis,想请教一下解决方案
当api模块下,controller目录下有v1,v2目录时,使用$this->visit($url),总是会提示http响应为500,但是url在浏览器里面打开却是正常的
composer.json : "require": { "php": ">=5.4.0", "topthink/framework": "^5.0", "topthink/think-testing": "^1.0" }, 根据官网文档建议,在index.php中定义 define('CONF_PATH', __DIR__.'/../config/'); php think unit 测试中,发现没引入 index.php 入口文件文件,导致 配置目录读取错误,需要更改 CONF_PATH的定义位置,是不是启动 unit时加载 index.php 会好点?
如下代码: ```
控制器如下: ```
如题