Skip to content

Commit

Permalink
Adapt orchestration's DIRECTORY_SEPARATOR
Browse files Browse the repository at this point in the history
  • Loading branch information
r-kujawa committed Apr 27, 2024
1 parent a94c9d3 commit 5b9723c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"test": "vendor/bin/phpunit"
},
"require": {
"payavel/orchestration": "dev-bug-windows_directory_seperator"
"payavel/orchestration": "dev-master"
},
"require-dev": {
"orchestra/testbench": "^8.0|^9.0"
Expand Down
17 changes: 9 additions & 8 deletions tests/Feature/Console/Commands/TestCheckoutInstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public function checkout_install_command_injects_checkout_service_into_orchestra
$fakeGateway = $this->gatewayPath($this->checkoutService);
$providerGateway = $this->gatewayPath($provider);

$ds = DIRECTORY_SEPARATOR;
$this->artisan('checkout:install')
->expectsQuestion("Choose a driver for the {$this->checkoutService->getName()} service.", Config::get('orchestration.defaults.driver'))
->expectsQuestion("How should the {$this->checkoutService->getName()} provider be named?", $provider->getName())
Expand All @@ -33,14 +34,14 @@ public function checkout_install_command_injects_checkout_service_into_orchestra
->expectsQuestion("How should the {$this->checkoutService->getName()} account be named?", $account->getName())
->expectsQuestion("How should the {$this->checkoutService->getName()} account be identified?", $account->getId())
->expectsConfirmation("Would you like to add another {$this->checkoutService->getName()} account?", 'no')
->expectsOutputToContain("Config [config/{$checkoutServiceConfig->orchestration}] created successfully.")
->expectsOutputToContain("Config [config/{$checkoutServiceConfig->service}] created successfully.")
->expectsOutputToContain("Contract [app/{$checkoutServiceContract->requester}] created successfully.")
->expectsOutputToContain("Contract [app/{$checkoutServiceContract->responder}] created successfully.")
->expectsOutputToContain("Gateway [app/{$fakeGateway->request}] created successfully.")
->expectsOutputToContain("Gateway [app/{$fakeGateway->response}] created successfully.")
->expectsOutputToContain("Gateway [app/{$providerGateway->request}] created successfully.")
->expectsOutputToContain("Gateway [app/{$providerGateway->response}] created successfully.")
->expectsOutputToContain("Config [config{$ds}{$checkoutServiceConfig->orchestration}] created successfully.")
->expectsOutputToContain("Config [config{$ds}{$checkoutServiceConfig->service}] created successfully.")
->expectsOutputToContain("Contract [app{$ds}{$checkoutServiceContract->requester}] created successfully.")
->expectsOutputToContain("Contract [app{$ds}{$checkoutServiceContract->responder}] created successfully.")
->expectsOutputToContain("Gateway [app{$ds}{$fakeGateway->request}] created successfully.")
->expectsOutputToContain("Gateway [app{$ds}{$fakeGateway->response}] created successfully.")
->expectsOutputToContain("Gateway [app{$ds}{$providerGateway->request}] created successfully.")
->expectsOutputToContain("Gateway [app{$ds}{$providerGateway->response}] created successfully.")
->assertSuccessful();

$config = require(config_path($checkoutServiceConfig->service));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ public function checkout_provider_command_injects_checkout_service_into_orchestr

$gateway = $this->gatewayPath($provider);

$ds = DIRECTORY_SEPARATOR;
$this->artisan('checkout:provider', [
'provider' => $provider->getName(),
'--id' => $provider->getId(),
])
->expectsOutputToContain("Gateway [app/{$gateway->request}] created successfully.")
->expectsOutputToContain("Gateway [app/{$gateway->response}] created successfully.")
->expectsOutputToContain("Gateway [app{$ds}{$gateway->request}] created successfully.")
->expectsOutputToContain("Gateway [app{$ds}{$gateway->response}] created successfully.")
->assertSuccessful();

$this->assertGatewayExists($provider);
Expand Down

0 comments on commit 5b9723c

Please sign in to comment.