Commit c7887b66 by Mark Committed by Qiang Xue

Added missed case in tests about append option

parent 3e58491b
...@@ -9,7 +9,7 @@ use yii\console\controllers\FixtureController; ...@@ -9,7 +9,7 @@ use yii\console\controllers\FixtureController;
/** /**
* Unit test for [[\yii\console\controllers\FixtureController]]. * Unit test for [[\yii\console\controllers\FixtureController]].
* @see MigrateController * @see FixtureController
* *
* @group console * @group console
*/ */
...@@ -159,6 +159,20 @@ class FixtureControllerTest extends TestCase ...@@ -159,6 +159,20 @@ class FixtureControllerTest extends TestCase
$this->assertEmpty(FixtureStorage::$firstFixtureData, 'first fixture data should not be loaded'); $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 * @expectedException \yii\console\Exception
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment