src/Codeception/Module/WPDb.php
public function haveManyLinksInDatabase($count, 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->haveLinkInDatabase($thisOverrides);
        }

        return $ids;
    }
public function haveManyLinksInDatabase($count, 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->haveLinkInDatabase($thisOverrides);
        }

        return $ids;
    }
public function haveManyLinksInDatabase ( $ count , 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 -> haveLinkInDatabase ( $ thisOverrides ) ; } return $ ids ; }
Inserts many links in the database `links` table.

@example
```php
// Insert 3 randomly generated links in the database.
$linkIds = $I->haveManyLinksInDatabase(3);
// Inserts links in the database replacing the `n` placeholder.
$linkIds = $I->haveManyLinksInDatabase(3, ['link_url' => 'http://example.org/test-{{n}}']);
```

@param int        $count     The number of links to insert.
@param array|null $overrides Overrides for the default arguments.

@return array An array of inserted `link_id`s.
Inserts many links in the database links table .