src/Codeception/Module/WPDb.php
public function useTheme($stylesheet, $template = null, $themeName = null)
    {
        if (!(is_string($stylesheet))) {
            throw new \InvalidArgumentException('Stylesheet must be a string');
        }
        if (!(is_string($template) || $template === null)) {
            throw new \InvalidArgumentException('Template must either be a string or be null.');
        }
        if (!(is_string($themeName) || $themeName === null)) {
            throw new \InvalidArgumentException('Current Theme must either be a string or be null.');
        }

        $template = $template ?: $stylesheet;
        $themeName = $themeName ?: ucwords($stylesheet, " _");

        $this->haveOptionInDatabase('stylesheet', $stylesheet);
        $this->haveOptionInDatabase('template', $template);
        $this->haveOptionInDatabase('current_theme', $themeName);

        $this->stylesheet = $stylesheet;
        $this->menus[$stylesheet] = empty($this->menus[$stylesheet]) ? [] : $this->menus[$stylesheet];
    }
public function useTheme($stylesheet, $template = null, $themeName = null)
    {
        if (!(is_string($stylesheet))) {
            throw new \InvalidArgumentException('Stylesheet must be a string');
        }
        if (!(is_string($template) || $template === null)) {
            throw new \InvalidArgumentException('Template must either be a string or be null.');
        }
        if (!(is_string($themeName) || $themeName === null)) {
            throw new \InvalidArgumentException('Current Theme must either be a string or be null.');
        }

        $template = $template ?: $stylesheet;
        $themeName = $themeName ?: ucwords($stylesheet, " _");

        $this->haveOptionInDatabase('stylesheet', $stylesheet);
        $this->haveOptionInDatabase('template', $template);
        $this->haveOptionInDatabase('current_theme', $themeName);

        $this->stylesheet = $stylesheet;
        $this->menus[$stylesheet] = empty($this->menus[$stylesheet]) ? [] : $this->menus[$stylesheet];
    }
public function useTheme ( $ stylesheet , $ template = null , $ themeName = null ) { if ( ! ( is_string ( $ stylesheet ) ) ) { throw new \ InvalidArgumentException ( 'Stylesheet must be a string' ) ; } if ( ! ( is_string ( $ template ) || $ template === null ) ) { throw new \ InvalidArgumentException ( 'Template must either be a string or be null.' ) ; } if ( ! ( is_string ( $ themeName ) || $ themeName === null ) ) { throw new \ InvalidArgumentException ( 'Current Theme must either be a string or be null.' ) ; } $ template = $ template ? : $ stylesheet ; $ themeName = $ themeName ? : ucwords ( $ stylesheet , " _" ) ; $ this -> haveOptionInDatabase ( 'stylesheet' , $ stylesheet ) ; $ this -> haveOptionInDatabase ( 'template' , $ template ) ; $ this -> haveOptionInDatabase ( 'current_theme' , $ themeName ) ; $ this -> stylesheet = $ stylesheet ; $ this -> menus [ $ stylesheet ] = empty ( $ this -> menus [ $ stylesheet ] ) ? [ ] : $ this -> menus [ $ stylesheet ] ; }
Sets the current theme options.

@example
```php
$I->useTheme('twentyseventeen');
$I->useTheme('child-of-twentyseventeen', 'twentyseventeen');
$I->useTheme('acme', 'acme', 'Acme Theme');
```

@param string      $stylesheet The theme stylesheet slug, e.g. `twentysixteen`.
@param string|null $template   The theme template slug, e.g. `twentysixteen`, defaults to `$stylesheet`.

@param string|null $themeName  The theme name, e.g. `Acme`, defaults to the "title" version of `$stylesheet`.
Sets the current theme options .