src/Codeception/Module/WPDb.php
public function haveManyTermsInDatabase($count, $name, $taxonomy, array $overrides = [])
    {
        if (!is_int($count)) {
            throw new \InvalidArgumentException('Count must be an integer value');
        }
        $ids = [];
        $overrides = $this->setTemplateData($overrides);
        for ($i = 0; $i < $count; $i++) {
            $thisName = false === strpos(
                $name,
                $this->numberPlaceholder
            ) ? $name . ' ' . $i : $this->replaceNumbersInString($name, $i);
            $thisTaxonomy = $this->replaceNumbersInString($taxonomy, $i);
            $thisOverrides = $this->replaceNumbersInArray($overrides, $i);
            $ids[] = $this->haveTermInDatabase($thisName, $thisTaxonomy, $thisOverrides);
        }

        return $ids;
    }
public function haveManyTermsInDatabase($count, $name, $taxonomy, array $overrides = [])
    {
        if (!is_int($count)) {
            throw new \InvalidArgumentException('Count must be an integer value');
        }
        $ids = [];
        $overrides = $this->setTemplateData($overrides);
        for ($i = 0; $i < $count; $i++) {
            $thisName = false === strpos(
                $name,
                $this->numberPlaceholder
            ) ? $name . ' ' . $i : $this->replaceNumbersInString($name, $i);
            $thisTaxonomy = $this->replaceNumbersInString($taxonomy, $i);
            $thisOverrides = $this->replaceNumbersInArray($overrides, $i);
            $ids[] = $this->haveTermInDatabase($thisName, $thisTaxonomy, $thisOverrides);
        }

        return $ids;
    }
public function haveManyTermsInDatabase ( $ count , $ name , $ taxonomy , array $ overrides = [ ] ) { if ( ! is_int ( $ count ) ) { throw new \ InvalidArgumentException ( 'Count must be an integer value' ) ; } $ ids = [ ] ; $ overrides = $ this -> setTemplateData ( $ overrides ) ; for ( $ i = 0 ; $ i < $ count ; $ i ++ ) { $ thisName = false === strpos ( $ name , $ this -> numberPlaceholder ) ? $ name . ' ' . $ i : $ this -> replaceNumbersInString ( $ name , $ i ) ; $ thisTaxonomy = $ this -> replaceNumbersInString ( $ taxonomy , $ i ) ; $ thisOverrides = $ this -> replaceNumbersInArray ( $ overrides , $ i ) ; $ ids [ ] = $ this -> haveTermInDatabase ( $ thisName , $ thisTaxonomy , $ thisOverrides ) ; } return $ ids ; }
Inserts many terms in the database.

@example
```php
$terms = $I->haveManyTermsInDatabase(3, 'genre-{{n}}', 'genre');
$termIds = array_column($terms, 0);
$termTaxonomyIds = array_column($terms, 1);
```

@param       int    $count     The number of terms to insert.
@param       string $name      The term name template, can include the `{{n}}` placeholder.
@param       string $taxonomy  The taxonomy to insert the terms for.
@param array        $overrides An associative array of default overrides.

@return array An array of arrays containing `term_id` and `term_taxonomy_id` of the inserted terms.
Inserts many terms in the database .