Fr3nch13/CakePHP Utilities

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

Methods

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
inheritDoc

teardownTest()

Called after each test run in each TestCase.

public teardownTest() : void
Tags
inheritDoc

        
On this page

Search results