Documentation

MinkBase extends CiviEndToEndTestCase
in package

AbstractYes

Class MinkBase. Helper functions for E2E testing.

Table of Contents

Properties

$mink  : Mink|null
$screenshotsEnabled  : bool

Methods

setUpBeforeClass()  : void
assertSession()  : WebAssert
createMink()  : Mink
createScreenshot()  : void
Creates a screenshot.
login()  : void
setUp()  : void
tearDown()  : void
visit()  : void
getUserId()  : int

Properties

$screenshotsEnabled

protected bool $screenshotsEnabled = FALSE

Methods

assertSession()

protected assertSession() : WebAssert
Return values
WebAssert

createMink()

protected createMink() : Mink
Return values
Mink

createScreenshot()

Creates a screenshot.

protected createScreenshot(string $filename[, bool $set_background_color = TRUE ][, bool $force = FALSE ]) : void
Parameters
$filename : string

The file name of the resulting screenshot including a writable path. For example, /tmp/test_screenshot.jpg.

$set_background_color : bool = TRUE

(optional) By default this method will set the background color to white. Set to FALSE to override this behavior.

$force : bool = FALSE

(optional) By default this method will not take screenshots for performance reasons. Set to TRUE to take screenshots.

Tags
throws
UnsupportedDriverActionException

When operation not supported by the driver.

throws
DriverException

When the operation cannot be done.

login()

protected login(string $user) : void
Parameters
$user : string

visit()

protected visit(string $url) : void
Parameters
$url : string

getUserId()

private getUserId(string $user) : int
Parameters
$user : string
Return values
int

        
On this page

Search results