diff --git a/tests/unit/framework/console/controllers/FixtureControllerTest.php b/tests/unit/framework/console/controllers/FixtureControllerTest.php index 54cc564..06155a7 100644 --- a/tests/unit/framework/console/controllers/FixtureControllerTest.php +++ b/tests/unit/framework/console/controllers/FixtureControllerTest.php @@ -9,7 +9,7 @@ use yii\console\controllers\FixtureController; /** * Unit test for [[\yii\console\controllers\FixtureController]]. - * @see MigrateController + * @see FixtureController * * @group console */ @@ -159,6 +159,20 @@ class FixtureControllerTest extends TestCase $this->assertEmpty(FixtureStorage::$firstFixtureData, 'first fixture data should not be loaded'); } + public function testAppendFixtureData() + { + $this->assertEmpty(FixtureStorage::$firstFixtureData, 'first fixture data should be unloaded'); + + $this->_fixtureController->actionLoad('First'); + + $this->assertCount(1, FixtureStorage::$firstFixtureData, 'first fixture data should be loaded'); + + $this->_fixtureController->append = true; + $this->_fixtureController->actionLoad('First'); + + $this->assertCount(2, FixtureStorage::$firstFixtureData, 'first fixture data should be appended to already existed one'); + } + /** * @expectedException \yii\console\Exception */