-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Add RunCommandTest and update ScoreCommandTest
- Added RunCommandTest to test running Soar with given options - Updated ScoreCommandTest to test getting Soar scores of SQL statements
- Loading branch information
Showing
2 changed files
with
32 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of the guanguans/laravel-soar. | ||
* | ||
* (c) guanguans <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled. | ||
*/ | ||
|
||
namespace Tests\Facades; | ||
|
||
use Guanguans\LaravelSoar\Commands\RunCommand; | ||
use Symfony\Component\Console\Command\Command; | ||
|
||
use function Pest\Laravel\artisan; | ||
|
||
it('can run Soar with the given options', function (): void { | ||
artisan( | ||
RunCommand::class, | ||
[ | ||
'--option' => [ | ||
'-verbose=true', | ||
'-help=true', | ||
], | ||
'--verbose' => true, | ||
] | ||
)->assertExitCode(Command::SUCCESS); | ||
})->group(__DIR__, __FILE__); |
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