src/Codeception/Module/WPDb.php
public function haveOptionInDatabase($option_name, $option_value, $autoload = 'yes')
    {
        $table = $this->grabPrefixedTableNameFor('options');
        $this->dontHaveInDatabase($table, ['option_name' => $option_name]);
        $option_value = $this->maybeSerialize($option_value);

        return $this->haveInDatabase($table, [
            'option_name' => $option_name,
            'option_value' => $option_value,
            'autoload' => $autoload,
        ]);
    }
public function haveOptionInDatabase($option_name, $option_value, $autoload = 'yes')
    {
        $table = $this->grabPrefixedTableNameFor('options');
        $this->dontHaveInDatabase($table, ['option_name' => $option_name]);
        $option_value = $this->maybeSerialize($option_value);

        return $this->haveInDatabase($table, [
            'option_name' => $option_name,
            'option_value' => $option_value,
            'autoload' => $autoload,
        ]);
    }
public function haveOptionInDatabase ( $ option_name , $ option_value , $ autoload = 'yes' ) { $ table = $ this -> grabPrefixedTableNameFor ( 'options' ) ; $ this -> dontHaveInDatabase ( $ table , [ 'option_name' => $ option_name ] ) ; $ option_value = $ this -> maybeSerialize ( $ option_value ) ; return $ this -> haveInDatabase ( $ table , [ 'option_name' => $ option_name , 'option_value' => $ option_value , 'autoload' => $ autoload , ] ) ; }
Inserts an option in the database.

@example
```php
$I->haveOptionInDatabase('posts_per_page, 23);
$I->haveOptionInDatabase('my_plugin_options', ['key_one' => 'value_one', 'key_two' => 89]);
```

If the option value is an object or an array then the value will be serialized.

@param  string $option_name The option name.
@param  mixed  $option_value The option value; if an array or object it will be serialized.
@param string  $autoload Wether the option should be autoloaded by WordPress or not.

@return int The inserted option `option_id`
Inserts an option in the database .