PHP 트레잇 Codeception\Module\WPBrowserMethods

파일 보기 프로젝트 열기: lucatume/wp-browser

공개 메소드들

메소드 설명
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