From f54237159da2437aea09a0b70a8214c7766527a0 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 18 Jan 2019 12:14:47 +0100 Subject: [PATCH] Cleanups --- tests/Composer/Test/Repository/Pear/ChannelReaderTest.php | 8 ++++---- .../Test/Repository/Pear/ChannelRest10ReaderTest.php | 4 ++-- .../Test/Repository/Pear/ChannelRest11ReaderTest.php | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/Composer/Test/Repository/Pear/ChannelReaderTest.php b/tests/Composer/Test/Repository/Pear/ChannelReaderTest.php index 7ad30825d..95e59e906 100644 --- a/tests/Composer/Test/Repository/Pear/ChannelReaderTest.php +++ b/tests/Composer/Test/Repository/Pear/ChannelReaderTest.php @@ -28,13 +28,13 @@ class ChannelReaderTest extends TestCase { public function testShouldBuildPackagesFromPearSchema() { - $rfs = new HttpDownloaderMock(array( + $httpDownloader = new HttpDownloaderMock(array( 'http://pear.net/channel.xml' => file_get_contents(__DIR__ . '/Fixtures/channel.1.1.xml'), 'http://test.loc/rest11/c/categories.xml' => file_get_contents(__DIR__ . '/Fixtures/Rest1.1/categories.xml'), 'http://test.loc/rest11/c/Default/packagesinfo.xml' => file_get_contents(__DIR__ . '/Fixtures/Rest1.1/packagesinfo.xml'), )); - $reader = new \Composer\Repository\Pear\ChannelReader($rfs); + $reader = new \Composer\Repository\Pear\ChannelReader($httpDownloader); $channelInfo = $reader->read('http://pear.net/'); $packages = $channelInfo->getPackages(); @@ -50,7 +50,7 @@ class ChannelReaderTest extends TestCase public function testShouldSelectCorrectReader() { - $rfs = new HttpDownloaderMock(array( + $httpDownloader = new HttpDownloaderMock(array( 'http://pear.1.0.net/channel.xml' => file_get_contents(__DIR__ . '/Fixtures/channel.1.0.xml'), 'http://test.loc/rest10/p/packages.xml' => file_get_contents(__DIR__ . '/Fixtures/Rest1.0/packages.xml'), 'http://test.loc/rest10/p/http_client/info.xml' => file_get_contents(__DIR__ . '/Fixtures/Rest1.0/http_client_info.xml'), @@ -64,7 +64,7 @@ class ChannelReaderTest extends TestCase 'http://test.loc/rest11/c/Default/packagesinfo.xml' => file_get_contents(__DIR__ . '/Fixtures/Rest1.1/packagesinfo.xml'), )); - $reader = new \Composer\Repository\Pear\ChannelReader($rfs); + $reader = new \Composer\Repository\Pear\ChannelReader($httpDownloader); $reader->read('http://pear.1.0.net/'); $reader->read('http://pear.1.1.net/'); diff --git a/tests/Composer/Test/Repository/Pear/ChannelRest10ReaderTest.php b/tests/Composer/Test/Repository/Pear/ChannelRest10ReaderTest.php index 5a40915e1..3960c7858 100644 --- a/tests/Composer/Test/Repository/Pear/ChannelRest10ReaderTest.php +++ b/tests/Composer/Test/Repository/Pear/ChannelRest10ReaderTest.php @@ -19,7 +19,7 @@ class ChannelRest10ReaderTest extends TestCase { public function testShouldBuildPackagesFromPearSchema() { - $rfs = new HttpDownloaderMock(array( + $httpDownloader = new HttpDownloaderMock(array( 'http://test.loc/rest10/p/packages.xml' => file_get_contents(__DIR__ . '/Fixtures/Rest1.0/packages.xml'), 'http://test.loc/rest10/p/http_client/info.xml' => file_get_contents(__DIR__ . '/Fixtures/Rest1.0/http_client_info.xml'), 'http://test.loc/rest10/r/http_client/allreleases.xml' => file_get_contents(__DIR__ . '/Fixtures/Rest1.0/http_client_allreleases.xml'), @@ -29,7 +29,7 @@ class ChannelRest10ReaderTest extends TestCase 'http://test.loc/rest10/r/http_request/deps.1.4.0.txt' => file_get_contents(__DIR__ . '/Fixtures/Rest1.0/http_request_deps.1.4.0.txt'), )); - $reader = new \Composer\Repository\Pear\ChannelRest10Reader($rfs); + $reader = new \Composer\Repository\Pear\ChannelRest10Reader($httpDownloader); /** @var \Composer\Package\PackageInterface[] $packages */ $packages = $reader->read('http://test.loc/rest10'); diff --git a/tests/Composer/Test/Repository/Pear/ChannelRest11ReaderTest.php b/tests/Composer/Test/Repository/Pear/ChannelRest11ReaderTest.php index 08c3a2998..684c59155 100644 --- a/tests/Composer/Test/Repository/Pear/ChannelRest11ReaderTest.php +++ b/tests/Composer/Test/Repository/Pear/ChannelRest11ReaderTest.php @@ -19,13 +19,13 @@ class ChannelRest11ReaderTest extends TestCase { public function testShouldBuildPackagesFromPearSchema() { - $rfs = new HttpDownloaderMock(array( + $httpDownloader = new HttpDownloaderMock(array( 'http://pear.1.1.net/channel.xml' => file_get_contents(__DIR__ . '/Fixtures/channel.1.1.xml'), 'http://test.loc/rest11/c/categories.xml' => file_get_contents(__DIR__ . '/Fixtures/Rest1.1/categories.xml'), 'http://test.loc/rest11/c/Default/packagesinfo.xml' => file_get_contents(__DIR__ . '/Fixtures/Rest1.1/packagesinfo.xml'), )); - $reader = new \Composer\Repository\Pear\ChannelRest11Reader($rfs); + $reader = new \Composer\Repository\Pear\ChannelRest11Reader($httpDownloader); /** @var \Composer\Package\PackageInterface[] $packages */ $packages = $reader->read('http://test.loc/rest11');