【发布时间】:2020-04-28 12:22:18
【问题描述】:
我正在使用代码接收并运行多组示例数据。
我正在发送多个接受标头,其中之一是"*/*"。
所以示例代码是:
/**
* My description of the test
*
* GET a/path/i/am/testing
*
* @example ["*/*", 200]
* @example ["application/json", 200]
* @example ["text/html", 200]
*
*/
我尝试过双引号内的单引号,我尝试过单引号内的双引号,我尝试过连接每个片段,我尝试过反斜杠,我尝试过 Unicode。 PHP 认为 splat 正在与 docblock 对话。我错过了什么?提前致谢!
【问题讨论】:
-
你用反斜杠做了什么?像这样?
@example ["*\/*", 200](顺便说一下,PHP 中的“splat 运算符”通常指的是...运算符而不是星号)
标签: php escaping codeception splat docblocks