Skip to content

Commit 1f867cd

Browse files
committed
Ensure assert_posts_exist doesn't get empty arrays
1 parent 97e0650 commit 1f867cd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/wpunit/QueryBuilder/CRUDTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,9 @@ private function insert_posts( array $posts ): array {
437437
* @return void
438438
*/
439439
private function assert_posts_exist( array $posts, array $ids ) {
440+
$this->assertNotEmpty($posts);
441+
$this->assertNotEmpty($ids);
442+
440443
$foundPosts = DB::table('posts')
441444
->select(...array_keys($posts[0]))
442445
->whereIn('ID', $ids)

0 commit comments

Comments
 (0)