yiisoft /
demo
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace App\Tests\Cli; |
||
| 6 | |||
| 7 | use App\Tests\Support\CliTester; |
||
| 8 | use Yiisoft\Yii\Console\ExitCode; |
||
|
0 ignored issues
–
show
|
|||
| 9 | |||
| 10 | final class ConsoleCest |
||
| 11 | { |
||
| 12 | public function testCommandYii(CliTester $I): void |
||
| 13 | { |
||
| 14 | $command = dirname(__DIR__, 2) . '/yii'; |
||
| 15 | $I->runShellCommand($command); |
||
| 16 | $I->seeInShellOutput('Yii Console'); |
||
| 17 | } |
||
| 18 | |||
| 19 | public function testCommandFixtureAdd(CliTester $I): void |
||
| 20 | { |
||
| 21 | $command = dirname(__DIR__, 2) . '/yii'; |
||
| 22 | $I->runShellCommand($command . ' fixture/add'); |
||
| 23 | $I->seeResultCodeIs(ExitCode::OK); |
||
| 24 | } |
||
| 25 | |||
| 26 | public function testCommandListCommand(CliTester $I): void |
||
| 27 | { |
||
| 28 | $command = dirname(__DIR__, 2) . '/yii'; |
||
| 29 | $I->runShellCommand($command . ' list'); |
||
| 30 | $I->seeResultCodeIs(ExitCode::OK); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function testCommandUserCreateSuccessCommand(CliTester $I): void |
||
| 34 | { |
||
| 35 | $command = dirname(__DIR__, 2) . '/yii'; |
||
| 36 | $I->runShellCommand($command . ' user/create user create123456'); |
||
| 37 | $I->seeResultCodeIs(ExitCode::OK); |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Clear all data created with testCommandFixtureAdd(). |
||
| 42 | * Clearing database prevents from getting errors during multiple continuous testing with other test, |
||
| 43 | * what are based on empty database (eg, BlogPageCest). |
||
| 44 | */ |
||
| 45 | public function testCommandCycleSchemaClear(CliTester $I): void |
||
| 46 | { |
||
| 47 | $command = dirname(__DIR__, 2) . '/yii'; |
||
| 48 | $I->runShellCommand($command . ' fixture/schema/clear'); |
||
| 49 | $I->seeResultCodeIs(0); |
||
| 50 | } |
||
| 51 | } |
||
| 52 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths