-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
tests/functional/Cloud/Console/Command/CreateCommandTest.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,51 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace functional\Cloud\Console\Command; | ||
|
||
use Kiboko\Component\Satellite\Cloud\Console\Command\CreateCommand; | ||
use PHPUnit\Framework\TestCase; | ||
use Symfony\Component\Console\Application; | ||
use Symfony\Component\Console\Tester\CommandTester; | ||
|
||
class CreateCommandTest extends TestCase | ||
{ | ||
public function testCreateCommandWithOneSatellite(): void | ||
{ | ||
$application = new Application(); | ||
$application->add(new CreateCommand()); | ||
|
||
$command = $application->find('create'); | ||
$commandTester = new CommandTester($command); | ||
$commandTester->execute( | ||
[ | ||
'config' => sys_get_temp_dir(), | ||
] | ||
); | ||
|
||
$output = $commandTester->getDisplay(); | ||
$this->assertStringContainsString('Résultat attendu', $output); | ||
|
||
$this->assertSame(0, $commandTester->getStatusCode()); | ||
} | ||
|
||
public function testCreateCommandWithMultipleSatellite(): void | ||
{ | ||
$application = new Application(); | ||
$application->add(new CreateCommand()); | ||
|
||
$command = $application->find('create'); | ||
$commandTester = new CommandTester($command); | ||
$commandTester->execute( | ||
[ | ||
'config' => sys_get_temp_dir(), | ||
] | ||
); | ||
|
||
$output = $commandTester->getDisplay(); | ||
$this->assertStringContainsString('Résultat attendu', $output); | ||
|
||
$this->assertSame(0, $commandTester->getStatusCode()); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/functional/Cloud/Console/Command/RemoveCommandTest.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,10 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace functional\Cloud\Console\Command; | ||
|
||
class RemoveCommandTest | ||
{ | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
tests/functional/Cloud/Console/Command/UpdateCommandTest.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,10 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace functional\Cloud\Console\Command; | ||
|
||
class UpdateCommandTest | ||
{ | ||
|
||
} |