From da881c118ba9e1ac88fddb68451dd8866ca27f59 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 12 Dec 2014 13:15:34 +0000 Subject: [PATCH] Fix failures --- tests/Composer/Test/CacheTest.php | 6 ++++++ tests/Composer/Test/Util/StreamContextFactoryTest.php | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/tests/Composer/Test/CacheTest.php b/tests/Composer/Test/CacheTest.php index 80c7de6bf..0651ed512 100644 --- a/tests/Composer/Test/CacheTest.php +++ b/tests/Composer/Test/CacheTest.php @@ -46,6 +46,9 @@ class CacheTest extends TestCase public function testRemoveOutdatedFiles() { + // sleeping a bit to let the filesystem cool down on travis or it has intermittent failures + usleep(50000); + $outdated = array_slice($this->files, 1); $this->finder ->expects($this->once()) @@ -66,6 +69,9 @@ class CacheTest extends TestCase public function testRemoveFilesWhenCacheIsTooLarge() { + // sleeping a bit to let the filesystem cool down on travis or it has intermittent failures + usleep(50000); + $emptyFinder = $this->getMockBuilder('Symfony\Component\Finder\Finder')->disableOriginalConstructor()->getMock(); $emptyFinder ->expects($this->once()) diff --git a/tests/Composer/Test/Util/StreamContextFactoryTest.php b/tests/Composer/Test/Util/StreamContextFactoryTest.php index fe6fa77fd..afb6bfc7e 100644 --- a/tests/Composer/Test/Util/StreamContextFactoryTest.php +++ b/tests/Composer/Test/Util/StreamContextFactoryTest.php @@ -154,6 +154,10 @@ class StreamContextFactoryTest extends \PHPUnit_Framework_TestCase public function testHttpsProxyOverride() { + if (!extension_loaded('openssl')) { + $this->markTestSkipped('Requires openssl'); + } + $_SERVER['http_proxy'] = 'http://username:password@proxyserver.net'; $_SERVER['https_proxy'] = 'https://woopproxy.net';