-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#111. Add more coverage on BaseCommand + fixes
- Loading branch information
1 parent
6d76603
commit 084bc98
Showing
6 changed files
with
120 additions
and
39 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
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
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
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,42 @@ | ||
<?php | ||
namespace rjapitest\unit\controllers; | ||
|
||
use Illuminate\Console\Command; | ||
use rjapi\controllers\BaseCommand; | ||
use rjapi\types\ConsoleInterface; | ||
use rjapitest\unit\TestCase; | ||
|
||
/** | ||
* Class BaseCommandTest | ||
* @package rjapitest\unit\controllers | ||
* | ||
* @property BaseCommand baseCommand | ||
*/ | ||
class BaseCommandTest extends TestCase | ||
{ | ||
private $baseCommand; | ||
|
||
/** | ||
* @throws \ReflectionException | ||
*/ | ||
public function setUp() | ||
{ | ||
parent::setUp(); | ||
$command = $this->createMock(Command::class)->method('options')->willReturn([ | ||
ConsoleInterface::OPTION_REGENERATE => 1, | ||
ConsoleInterface::OPTION_MIGRATIONS => 1, | ||
]); | ||
|
||
$this->baseCommand = new BaseCommand(); | ||
} | ||
|
||
/** | ||
* @test | ||
* @throws \rjapi\exceptions\DirectoryException | ||
*/ | ||
public function it_creates_sources_from_raml() | ||
{ | ||
$this->baseCommand->actionIndex(__DIR__ . '/../../functional/raml/articles.raml'); | ||
$this->assertInstanceOf(BaseCommand::class, $this->baseCommand); | ||
} | ||
} |
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
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