Support for IN operator in Db Module
还没有人认领这个 Issue。
评估
调研方向
从 Db 模块中的 $I->dontSeeInDatabase 入口点开始,跟踪数组条件如何转换为查询。复现报告中的数组值案例,然后添加对所请求 IN 行为的支持,并验证生成的断言将匹配的行视为不存在。
由索引模型根据 Issue 内容生成。
描述
What are you trying to achieve?
I wanted to check that $I->dontSeeInDatabase from a list of values. Instead of writing
$I->dontSeeInDatabase('someTable', ['foo' => 'cond1']);
$I->dontSeeInDatabase('someTable', ['foo' => 'cond2']);
$I->dontSeeInDatabase('someTable', ['foo' => 'cond3']);
I ended up writing
$I->dontSeeInDatabase('someTable', [
'foo' => ['cond1', 'cond2', 'cond3']
]);
hoping that it would generate the following query SELECT count(*) FROM someTable WHERE foo IN ('cond1', 'cond2', 'cond3') and assert that the result must be 0. However I ended up getting an exception, saying array-to-string conversion - obviously enough since this is not supported.
Do you think this is something good to have, or just bad test design on my part?
- Codeception version: 2.3.3
- 主要语言
- PHP
- 星标
- 23
- 派生
- 31
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Codeception/module-db 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 42/100
Codeception/module-db#87 ·
-
难度 4/5 3-5 天 新手友好度 25/100
Codeception/module-db#85 ·
-
难度 4/5 3-5 天 新手友好度 35/100
Codeception/module-db#68 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
Codeception/module-db#67 ·
-
难度 3/5 1-2 天 新手友好度 38/100
Codeception/module-db#58 ·
查看 Codeception/module-db 的全部 Issue
相似的 Issue
-
jira-created
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 1/5 1 小时以内 新手友好度 70/100
nunomaduro/phpinsights#745 ·
-
status/awaiting_triage
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 1/5 1 小时以内 新手友好度 90/100
WordPress/plugin-check#1486 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 88/100
az-digital/az_quickstart#6019 ·