This commit is contained in:
2020-10-06 14:27:47 +07:00
commit 586be80cf6
16613 changed files with 3274099 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
class RegisterCommandCest
{
public function registerCommand(CliGuy $I)
{
$I->amInPath('tests/data/register_command/standard');
$I->executeCommand('list');
$I->seeInShellOutput('myProject:myCommand');
}
public function registerCommandWithConfigurationAtNewPlace(CliGuy $I)
{
$I->amInPath('tests/data/register_command/');
$I->executeCommand('list -c standard/codeception.yml');
$I->seeInShellOutput('myProject:yourCommand');
}
public function startMyCommand(CliGuy $I)
{
$myname = get_current_user();
$I->amInPath('tests/data/register_command/standard');
$I->executeCommand('myProject:myCommand');
$I->seeInShellOutput("Hello {$myname}!");
}
public function startMyCommandWithOptionAndConfigurationAtNewPlace(CliGuy $I)
{
$myname = get_current_user();
$I->amInPath('tests/data/register_command');
$I->executeCommand('myProject:myCommand --config standard/codeception.yml --friendly');
$I->seeInShellOutput("Hello {$myname},");
$I->seeInShellOutput("how are you?");
}
}