Skip to content

Commit

Permalink
fix type errors in regression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianheuer committed Jun 2, 2019
1 parent 31e0b28 commit b290486
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/regression/InstallCommandTest.php
Expand Up @@ -19,7 +19,7 @@ public function testInstallsPhar(): void {
$this->runPhiveCommand('install', ['phpunit@5.3.1']);

$this->assertSymlinkTargetEquals(
$this->getToolsDirectory()->file('phpunit'),
$this->getToolsDirectory()->file('phpunit')->asString(),
$this->getPhiveHomeDirectory()->child('phars')->file('phpunit-5.3.1.phar')->asString()
);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/RemoveCommandTest.php
Expand Up @@ -7,7 +7,7 @@ public function testRemovesSymlink(): void {
$this->usePhiveXmlConfig(__DIR__ . '/fixtures/removeCommandTest/phive.xml');
$this->createSymlink(
$this->getPhiveHomeDirectory()->child('phars')->file('phpunit-5.3.1.phar')->asString(),
$this->getToolsDirectory()->file('phpunit')
$this->getToolsDirectory()->file('phpunit')->asString()
);

$this->runPhiveCommand('remove', ['phpunit']);
Expand Down
8 changes: 4 additions & 4 deletions tests/regression/UpdateCommandTest.php
Expand Up @@ -8,15 +8,15 @@ public function testUpdatesSymlinkToUpdatedVersion(): void {
$this->usePhiveXmlConfig(__DIR__ . '/fixtures/updateCommandTest/phive.xml');

$this->createSymlink(
$this->getPhiveHomeDirectory()->child('phars')->file('phpunit-5.3.1.phar'),
$this->getToolsDirectory()->file('phpunit')
$this->getPhiveHomeDirectory()->child('phars')->file('phpunit-5.3.1.phar')->asString(),
$this->getToolsDirectory()->file('phpunit')->asString()
);

$this->runPhiveCommand('update');

$this->assertSymlinkTargetEquals(
$this->getToolsDirectory()->file('phpunit'),
$this->getPhiveHomeDirectory()->child('phars')->file('phpunit-5.3.4.phar')
$this->getToolsDirectory()->file('phpunit')->asString(),
$this->getPhiveHomeDirectory()->child('phars')->file('phpunit-5.3.4.phar')->asString()
);
}
}
24 changes: 24 additions & 0 deletions tests/regression/fixtures/phive-home/repositories.xml
@@ -1,5 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<repositories xmlns="https://phar.io/repository-list">
<phar alias="phpbench" composer="phpbench/phpbench">
<repository type="github" url="https://api.github.com/repos/phpbench/phpbench/releases" />
</phar>
<phar alias="infection" composer="infection/infection">
<repository type="github" url="https://api.github.com/repos/infection/infection/releases" />
</phar>
<phar alias="phpab" composer="theseer/autoload">
<repository type="github" url="https://api.github.com/repos/theseer/autoload/releases" />
</phar>
Expand All @@ -18,6 +24,9 @@
<phar alias="phpbu" composer="phpbu/phpbu">
<repository url="https://phar.phpbu.de/phive.xml"/>
</phar>
<phar alias="php-doc-check" composer="nielsdeblaauw/php-doc-check">
<repository type="github" url="https://api.github.com/repos/nielsdeblaauw/php-doc-check/releases"/>
</phar>
<phar alias="dephpend" composer="dephpend/dephpend">
<repository url="https://phar.dephpend.com/phive.xml"/>
</phar>
Expand Down Expand Up @@ -72,4 +81,19 @@
<phar alias="ecc" composer="ngabor84/ecc">
<repository type="github" url="https://api.github.com/repos/ngabor84/ecc/releases" />
</phar>
<phar alias="wp" composer="wp-cli/wp-cli">
<repository type="github" url="https://api.github.com/repos/wp-cli/wp-cli/releases" />
</phar>
<phar alias="psh" composer="shopware/psh">
<repository type="github" url="https://api.github.com/repos/shopwareLabs/psh/releases" />
</phar>
<phar alias="sw-cli-tools" composer="shopwarelabs/sw-cli-tools">
<repository type="github" url="https://api.github.com/repos/shopwareLabs/sw-cli-tools/releases" />
</phar>
<phar alias="paratest" composer="brianium/paratest">
<repository type="github" url="https://api.github.com/repos/paratestphp/paratest/releases" />
</phar>
<phar alias="deptrac" composer="sensiolabs-de/deptrac">
<repository type="github" url="https://api.github.com/repos/sensiolabs-de/deptrac/releases" />
</phar>
</repositories>

0 comments on commit b290486

Please sign in to comment.