Skip to content

Commit

Permalink
Finalize code review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ffraenz committed Sep 14, 2020
1 parent 01be9b0 commit 90bc822
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ jobs:
- TEST_COVERAGE=true

before_install:
- if [[ ! -z $PHP_UNIT_VERSION ]] ; then composer require --dev --no-update phpunit/phpunit $PHP_UNIT_VERSION ; fi
- if [[ ! -z $COMPOSER2 ]] ; then composer self-update --snapshot ; composer config minimum-stability dev ; fi
- if [[ -n $PHP_UNIT_VERSION ]] ; then composer require --dev --no-update phpunit/phpunit $PHP_UNIT_VERSION ; fi
- if [[ -n $COMPOSER2 ]] ; then composer self-update --snapshot ; composer config minimum-stability dev ; fi

install:
- travis_retry composer install $COMPOSER_ARGS
- if [[ $TEST_COVERAGE == 'true' ]] ; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
- if [[ ! -z $COMPOSER2 ]] ; then travis_retry composer require --dev --with-all-dependencies $COMPOSER_ARGS composer/composer 2.0.0-alpha1 ; fi
- if [[ -n $COMPOSER2 ]] ; then travis_retry composer require --dev --with-all-dependencies $COMPOSER_ARGS composer/composer 2.0.0-alpha1 ; fi

script:
- if [[ $TEST_COVERAGE == 'true' ]] ; then composer test-coverage ; else composer test ; fi
Expand Down
21 changes: 5 additions & 16 deletions test/PrivateComposerInstaller/RemoteFilesystemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,24 @@ class RemoteFilesystemTest extends TestCase

protected function setUp(): void
{
// As of Composer 2 this class is no longer in use
if (version_compare(PluginInterface::PLUGIN_API_VERSION, '2.0.0', '>=')) {
$this->markTestSkipped();
}

$this->io = $this->createMock(IOInterface::class);
}

public function testExtendsComposerRemoteFilesystem()
{
if (PluginInterface::PLUGIN_API_VERSION === '2.0.0') {
$this->markTestSkipped();
}

$this->assertInstanceOf(
\Composer\Util\RemoteFilesystem::class,
new RemoteFilesystem('', $this->io)
);
}

protected function setUp(): void
{
if (version_compare(PluginInterface::PLUGIN_API_VERSION, '2.0.0', '>=')) {
$this->markTestSkipped();
}

$this->io = $this->createMock(IOInterface::class);
}
public function testCopyUsesPrivateFileUrl()
{
if (PluginInterface::PLUGIN_API_VERSION === '2.0.0') {
$this->markTestSkipped();
}

// Test inspired by testCopy in
// Composer\Test\Util\RemoteFilesystemTest
$privateFileUrl = 'file://' . __FILE__;
Expand Down

0 comments on commit 90bc822

Please sign in to comment.