src/Codeception/Module/WPDb.php
public function haveManyCommentsInDatabase($count, $comment_post_ID, array $overrides = [])
    {
        if (!is_int($count)) {
            throw new \InvalidArgumentException('Count must be an integer value');
        }
        $overrides = $this->setTemplateData($overrides);
        $ids = [];
        for ($i = 0; $i < $count; $i++) {
            $thisOverrides = $this->replaceNumbersInArray($overrides, $i);
            $ids[] = $this->haveCommentInDatabase($comment_post_ID, $thisOverrides);
        }

        return $ids;
    }
public function haveManyCommentsInDatabase($count, $comment_post_ID, array $overrides = [])
    {
        if (!is_int($count)) {
            throw new \InvalidArgumentException('Count must be an integer value');
        }
        $overrides = $this->setTemplateData($overrides);
        $ids = [];
        for ($i = 0; $i < $count; $i++) {
            $thisOverrides = $this->replaceNumbersInArray($overrides, $i);
            $ids[] = $this->haveCommentInDatabase($comment_post_ID, $thisOverrides);
        }

        return $ids;
    }
public function haveManyCommentsInDatabase ( $ count , $ comment_post_ID , array $ overrides = [ ] ) { if ( ! is_int ( $ count ) ) { throw new \ InvalidArgumentException ( 'Count must be an integer value' ) ; } $ overrides = $ this -> setTemplateData ( $ overrides ) ; $ ids = [ ] ; for ( $ i = 0 ; $ i < $ count ; $ i ++ ) { $ thisOverrides = $ this -> replaceNumbersInArray ( $ overrides , $ i ) ; $ ids [ ] = $ this -> haveCommentInDatabase ( $ comment_post_ID , $ thisOverrides ) ; } return $ ids ; }
Inserts many comments in the database.


@example
```php
// Insert 3 random comments for a post.
$I->haveManyCommentsInDatabase(3, $postId);
// Insert 3 random comments for a post.
$I->haveManyCommentsInDatabase(3, $postId, ['comment_content' => 'Comment {{n}}']);
```

@param int   $count           The number of comments to insert.
@param   int $comment_post_ID The comment parent post ID.
@param array $overrides       An associative array to override the defaults.

@return int[] An array containing the inserted comments IDs.
Inserts many comments in the database .