PHP Трейт Codeception\Module\WPBrowserMethods

Показать файл Открыть проект

Открытые методы

Метод Описание
activatePlugin ( string $pluginSlug ) : void In the plugin administration screen activates a plugin clicking the "Activate" link.
amOnAdminPage ( $path )
amOnPagesPage ( ) : void Navigates the browser to the Pages administration screen.
amOnPluginsPage ( ) : void Navigates the browser to the plugins administration screen.
deactivatePlugin ( string $pluginSlug ) : void In the plugin administration screen deactivates a plugin clicking the "Deactivate" link.
dontSeePluginInstalled ( string $pluginSlug ) : void Looks for a missing plugin in the plugin administration screen.
grabWordPressAuthCookie ( null $pattern = null ) : mixed Returns WordPress default auth cookie if present.
grabWordPressLoginCookie ( null $pattern = null ) : mixed Returns WordPress default login cookie if present.
grabWordPressTestCookie ( null $pattern = null ) : mixed Returns WordPress default test cookie if present.
loginAs ( string $username, string $password ) : array Goes to the login page and logs in using the given credentials.
loginAsAdmin ( ) : array Goes to the login page and logs in as the site admin.
seeErrorMessage ( array $classes = '' ) : void In an administration screen will look for an error message.
seeMessage ( array $classes = '' ) : void In an administration screen will look for a message.
seePluginActivated ( string $pluginSlug ) : void Looks for an activated plugin in the plugin administration screen.
seePluginDeactivated ( string $pluginSlug ) : void Looks for a deactivated plugin in the plugin administration screen.
seePluginInstalled ( string $pluginSlug ) : void Looks for a plugin in the plugin administration screen.
seeWpDiePage ( ) : void Checks that the current page is a wp_die generated one.

Описание методов

activatePlugin() публичный метод

The method will presume the browser is in the plugin screen already.
public activatePlugin ( string $pluginSlug ) : void
$pluginSlug string The plugin slug, like "hello-dolly".
Результат void

amOnAdminPage() публичный метод

public amOnAdminPage ( $path )

amOnPagesPage() публичный метод

Makes no check about the user being logged in and authorized to do so.
public amOnPagesPage ( ) : void
Результат void

amOnPluginsPage() публичный метод

Makes no check about the user being logged in and authorized to do so.
public amOnPluginsPage ( ) : void
Результат void

deactivatePlugin() публичный метод

The method will presume the browser is in the plugin screen already.
public deactivatePlugin ( string $pluginSlug ) : void
$pluginSlug string The plugin slug, like "hello-dolly".
Результат void

dontSeePluginInstalled() публичный метод

Will not navigate to the plugin administration screen.
public dontSeePluginInstalled ( string $pluginSlug ) : void
$pluginSlug string The plugin slug, like "hello-dolly".
Результат void

grabWordPressAuthCookie() публичный метод

Returns WordPress default auth cookie if present.
public grabWordPressAuthCookie ( null $pattern = null ) : mixed
$pattern null Optional, overrides the default cookie name.
Результат mixed Either a cookie or null.

grabWordPressLoginCookie() публичный метод

Returns WordPress default login cookie if present.
public grabWordPressLoginCookie ( null $pattern = null ) : mixed
$pattern null Optional, overrides the default cookie name.
Результат mixed Either a cookie or null.

grabWordPressTestCookie() публичный метод

Returns WordPress default test cookie if present.
public grabWordPressTestCookie ( null $pattern = null ) : mixed
$pattern null Optional, overrides the default cookie name.
Результат mixed Either a cookie or null.

loginAs() публичный метод

Goes to the login page and logs in using the given credentials.
public loginAs ( string $username, string $password ) : array
$username string
$password string
Результат array An array of login credentials and auth cookies.

loginAsAdmin() публичный метод

Goes to the login page and logs in as the site admin.
public loginAsAdmin ( ) : array
Результат array An array of login credentials and auth cookies.

seeErrorMessage() публичный метод

Allows for class-based error checking to decouple from internationalization.
public seeErrorMessage ( array $classes = '' ) : void
$classes array A list of classes the error notice should have.
Результат void

seeMessage() публичный метод

Allows for class-based error checking to decouple from internationalization.
public seeMessage ( array $classes = '' ) : void
$classes array A list of classes the message should have.
Результат void

seePluginActivated() публичный метод

Will not navigate to the plugin administration screen.
public seePluginActivated ( string $pluginSlug ) : void
$pluginSlug string The plugin slug, like "hello-dolly".
Результат void

seePluginDeactivated() публичный метод

Will not navigate to the plugin administration screen.
public seePluginDeactivated ( string $pluginSlug ) : void
$pluginSlug string The plugin slug, like "hello-dolly".
Результат void

seePluginInstalled() публичный метод

Will not navigate to the plugin administration screen.
public seePluginInstalled ( string $pluginSlug ) : void
$pluginSlug string The plugin slug, like "hello-dolly".
Результат void

seeWpDiePage() публичный метод

Checks that the current page is a wp_die generated one.
public seeWpDiePage ( ) : void
Результат void