-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #386 from jolicode/remote-import-default-version
Fix multiple remote imports with default version
- Loading branch information
Showing
6 changed files
with
89 additions
and
11 deletions.
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
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
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
18 changes: 18 additions & 0 deletions
18
tests/Examples/Generated/ImportSamePackageWithDefaultVersionTest.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,18 @@ | ||
<?php | ||
|
||
namespace Castor\Tests\Examples\Generated; | ||
|
||
use Castor\Tests\TaskTestCase; | ||
|
||
class ImportSamePackageWithDefaultVersionTest extends TaskTestCase | ||
{ | ||
// no task | ||
public function test(): void | ||
{ | ||
$process = $this->runTask([], '{{ base }}/tests/Examples/fixtures/valid/import-same-package-with-default-version', needRemote: true); | ||
|
||
$this->assertSame(0, $process->getExitCode()); | ||
$this->assertStringEqualsFile(__FILE__ . '.output.txt', $process->getOutput()); | ||
$this->assertSame('', $process->getErrorOutput()); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
tests/Examples/Generated/ImportSamePackageWithDefaultVersionTest.php.output.txt
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,24 @@ | ||
Downloading remote packages | ||
Remote packages imported | ||
|
||
castor v0.15.0 | ||
|
||
Usage: | ||
command [options] [arguments] | ||
|
||
Options: | ||
-h, --help Display help for the given command. When no command is given display help for the list command | ||
-q, --quiet Do not output any message | ||
-V, --version Display this application version | ||
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output | ||
-n, --no-interaction Do not ask any interactive question | ||
--no-remote Skip the import of all remote remote packages | ||
--update-remotes Force the update of remote packages | ||
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug | ||
|
||
Available commands: | ||
completion Dump the shell completion script | ||
help Display help for a command | ||
list List commands | ||
pyrech | ||
pyrech:hello-example Hello from example! |
6 changes: 6 additions & 0 deletions
6
tests/Examples/fixtures/valid/import-same-package-with-default-version/castor.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,6 @@ | ||
<?php | ||
|
||
use function Castor\import; | ||
|
||
import('composer://pyrech/castor-example'); | ||
import('composer://pyrech/castor-example', file: 'castor.php'); |