-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3961 from thangnnmd/unitTest_SetupTestCommand_exe…
…cute SetupTestCommand::execute
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
plugins/baser-core/tests/TestCase/Command/SetupTestCommandTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
namespace BaserCore\Test\TestCase\Command; | ||
|
||
use BaserCore\Command\SetupTestCommand; | ||
use BaserCore\TestSuite\BcTestCase; | ||
use Cake\Console\Arguments; | ||
use Cake\Console\ConsoleIo; | ||
|
||
class SetupTestCommandTest extends BcTestCase | ||
{ | ||
public function setUp(): void | ||
{ | ||
parent::setUp(); | ||
$this->command = new SetupTestCommand(); | ||
} | ||
|
||
public function tearDown(): void | ||
{ | ||
parent::tearDown(); | ||
} | ||
|
||
public function testExecute() | ||
{ | ||
$args = new Arguments([], [], []); | ||
$io = new ConsoleIo(); | ||
$this->command->execute($args, $io); | ||
$this->assertEquals('true', env('DEBUG')); | ||
$this->assertEquals('true' ,env('USE_CORE_API')); | ||
$this->assertEquals('true' ,env('USE_CORE_ADMIN_API')); | ||
} | ||
} |