Support for IN operator in Db Module
還沒有人認領這個 Issue。
評估
研究方向
從 Db 模組中的 $I->dontSeeInDatabase 進入點開始,追蹤陣列條件如何轉換成查詢。重現回報的陣列值案例,接著加入對所要求 IN 行為的支援,並驗證產生的 assertion 將符合的資料列視為不存在。
由索引模型根據 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
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 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 ·
-
Make optional the auto-erase of the records, added by `haveInDatabase()`可能已有人在做 @iliayatsenko 於 675 天前認領。 未關閉
難度 4/5 3-5 天 新手友好度 35/100
Codeception/module-db#68 · 1 則留言 ·
-
Fix a confusion between 'cleanup' and 'skip_cleanup_if_failed' configuration params可能已有人在做 @iliayatsenko 於 675 天前認領。 未關閉
難度 4/5 3-5 天 新手友好度 35/100
Codeception/module-db#67 ·
-
inserting null on an autoincrement primary key prevents cleanup可能已有人在做 @jtopenpetition 於 1214 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 38/100
Codeception/module-db#58 ·
查看 Codeception/module-db 的全部 Issue
相似的 Issue
-
Python 3.15 support可能已有人在做 @amnesiaof 今天認領。 未關閉L: python L: python:uv
難度 2/5 1-3 小時 新手友好度 72/100
dependabot/dependabot-core#16524 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 88/100
crazy-goat/rabbit-stream#830 ·
維護者通常 1 天內回覆
-
sync-en
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆
-
sync-en
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 4 天內回覆
-
Перевод устарел
難度 2/5 1-3 小時 新手友好度 70/100