interface TestState implements TestOnly (View source)

Helper for resetting, booting, or cleaning up test state.

SapphireTest will detect all implementors of this interface during test execution

Methods

public
setUp(SapphireTest $test)

Called on setup

public
tearDown(SapphireTest $test)

Called on tear down

public
setUpOnce(string $class)

Called once on setup

public
tearDownOnce(string $class)

Called once on tear down

Details

setUp(SapphireTest $test)

Called on setup

Parameters

SapphireTest $test

tearDown(SapphireTest $test)

Called on tear down

Parameters

SapphireTest $test

setUpOnce(string $class)

Called once on setup

Parameters

string $class

Class being setup

tearDownOnce(string $class)

Called once on tear down

Parameters

string $class

Class being torn down