Skip to content

单元测试请求返回500 #11

@1324457514

Description

@1324457514

为了使用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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions