Fr3nch13/CakePHP Utilities

FixtureInjector
in package
implements TestListener uses TestListenerTrait

Test listener used to inject a fixture manager in all tests that are composed inside a Test Suite

Table of Contents

Interfaces

TestListener

Properties

$_first  : TestSuite|null
Holds a reference to the container test suite
$_fixtureManager  : FixtureManager
The instance of the fixture manager to use

Methods

__construct()  : mixed
Constructor. Save internally the reference to the passed fixture manager
addError()  : void
addFailure()  : void
addIncompleteTest()  : void
addRiskyTest()  : void
addSkippedTest()  : void
addWarning()  : void
endTest()  : void
Unloads fixtures from the test case.
endTestSuite()  : void
Destroys the fixtures created by the fixture manager at the end of the test suite run
startTest()  : void
Adds fixtures to a test case when it starts.
startTestSuite()  : void
Iterates the tests inside a test suite and creates the required fixtures as they were expressed inside each test case.

Properties

$_first

Holds a reference to the container test suite

protected TestSuite|null $_first

Methods

addError()

public addError(Test $test, Throwable $t, float $time) : void
Parameters
$test : Test
$t : Throwable
$time : float
Tags
inheritDoc

addFailure()

public addFailure(Test $test, AssertionFailedError $e, float $time) : void
Parameters
$test : Test
$e : AssertionFailedError
$time : float
Tags
inheritDoc

addIncompleteTest()

public addIncompleteTest(Test $test, Throwable $t, float $time) : void
Parameters
$test : Test
$t : Throwable
$time : float
Tags
inheritDoc

addRiskyTest()

public addRiskyTest(Test $test, Throwable $t, float $time) : void
Parameters
$test : Test
$t : Throwable
$time : float
Tags
inheritDoc

addSkippedTest()

public addSkippedTest(Test $test, Throwable $t, float $time) : void
Parameters
$test : Test
$t : Throwable
$time : float
Tags
inheritDoc

addWarning()

public addWarning(Test $test, Warning $e, float $time) : void
Parameters
$test : Test
$e : Warning
$time : float
Tags
inheritDoc

endTest()

Unloads fixtures from the test case.

public endTest(Test $test, float $time) : void
Parameters
$test : Test

The test case

$time : float

current time

endTestSuite()

Destroys the fixtures created by the fixture manager at the end of the test suite run

public endTestSuite(TestSuite $suite) : void
Parameters
$suite : TestSuite

The test suite

startTest()

Adds fixtures to a test case when it starts.

public startTest(Test $test) : void
Parameters
$test : Test

The test case

startTestSuite()

Iterates the tests inside a test suite and creates the required fixtures as they were expressed inside each test case.

public startTestSuite(TestSuite $suite) : void
Parameters
$suite : TestSuite

The test suite


        
On this page

Search results