TransactionStrategy
in package
implements
FixtureStrategyInterface
Fixture strategy that wraps fixtures in a transaction that is rolled back after each test.
Any test that calls Connection::rollback(true) will break this strategy.
Table of Contents
Interfaces
- FixtureStrategyInterface
- Base interface for strategies used to manage fixtures for TestCase.
Properties
- $fixtures : array<string|int, FixtureInterface>
- $helper : FixtureHelper
Methods
- __construct() : mixed
- Initialize strategy.
- setupTest() : void
- Called before each test run in each TestCase.
- teardownTest() : void
- Called after each test run in each TestCase.
Properties
$fixtures
protected
array<string|int, FixtureInterface>
$fixtures
= []
$helper
protected
FixtureHelper
$helper
Methods
__construct()
Initialize strategy.
public
__construct() : mixed
setupTest()
Called before each test run in each TestCase.
public
setupTest(array<string|int, mixed> $fixtureNames) : void
Parameters
- $fixtureNames : array<string|int, mixed>
-
Name of fixtures used by test.
Tags
teardownTest()
Called after each test run in each TestCase.
public
teardownTest() : void