Class yii\codeception\DbTestCase

Inheritanceyii\codeception\DbTestCase » yii\codeception\TestCase » Codeception\TestCase\Test
Uses Traitsyii\test\FixtureTrait
Available since version2.0
Source Code https://github.com/yiisoft/yii2-codeception/blob/master/DbTestCase.php

Base class for database test cases

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$appConfig array|string The application configuration that will be used for creating an application instance for each test. yii\codeception\TestCase

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__call() Calls the named method which is not a class method. yii\codeception\TestCase
__get() Returns the value of an object property. yii\codeception\TestCase
fixtures() Declares the fixtures that are needed by the current test case. yii\test\FixtureTrait
getFixture() Returns the named fixture. yii\test\FixtureTrait
getFixtures() Returns the fixture objects as specified in globalFixtures() and fixtures(). yii\test\FixtureTrait
globalFixtures() Declares the fixtures shared required by different test cases. yii\codeception\DbTestCase
initFixtures() Initialize the fixtures. yii\test\FixtureTrait
loadFixtures() Loads the specified fixtures. yii\test\FixtureTrait
unloadFixtures() Unloads the specified fixtures. yii\test\FixtureTrait

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
createFixtures() Creates the specified fixture instances. yii\test\FixtureTrait
destroyApplication() Destroys the application instance created by mockApplication(). yii\codeception\TestCase
mockApplication() Mocks up the application instance. yii\codeception\TestCase
setUp() yii\codeception\TestCase
tearDown() yii\codeception\TestCase

Method Details

globalFixtures() public method

Declares the fixtures shared required by different test cases.

The return value should be similar to that of fixtures(). You should usually override this method in a base class.

public array globalFixtures ( )
return array

The fixtures shared and required by different test cases.