Skip to content

Commit

Permalink
refactor: extract methods
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Dec 22, 2020
1 parent 86606b0 commit 16d880e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions system/Test/CIDatabaseTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,17 @@ protected function setUp(): void

$this->loadDependencies();

$this->setUpMigrate();
$this->setUpSeed();
}

//--------------------------------------------------------------------

/**
* Migrate on setUp
*/
protected function setUpMigrate()
{
if ($this->migrateOnce === false || self::$doneMigration === false)
{
if ($this->refresh === true)
Expand All @@ -186,7 +197,15 @@ protected function setUp(): void

$this->migrateDatabase();
}
}

//--------------------------------------------------------------------

/**
* Seed on setUp
*/
protected function setUpSeed()
{
if ($this->seedOnce === false || self::$doneSeed === false)
{
$this->runSeeds();
Expand Down

0 comments on commit 16d880e

Please sign in to comment.