Class yii\codeception\DbTestCase
Inheritance | yii\codeception\DbTestCase » yii\codeception\TestCase » Codeception\TestCase\Test |
---|---|
Uses Traits | yii\test\FixtureTrait |
Available since version | 2.0 |
Source Code | https://github.com/yiisoft/yii2-codeception/blob/master/DbTestCase.php |
Base class for database test cases
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$appConfig | array|string | The application configuration that will be used for creating an application instance for each test. | yii\codeception\TestCase |
Public Methods
Method | Description | Defined 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
Method | Description | Defined 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
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. |
---|