From 523aef76d0fa29c18bf42264e88fc9b58acf825c Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 14 Dec 2014 13:46:37 +0000 Subject: [PATCH] Fix tests again.. --- tests/Composer/Test/CacheTest.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/Composer/Test/CacheTest.php b/tests/Composer/Test/CacheTest.php index 0585e78b8..b01dbfd89 100644 --- a/tests/Composer/Test/CacheTest.php +++ b/tests/Composer/Test/CacheTest.php @@ -21,6 +21,10 @@ class CacheTest extends TestCase public function setUp() { + if (getenv('TRAVIS')) { + $this->markTestSkipped('Test causes intermittent failures on Travis'); + } + $this->root = sys_get_temp_dir() . '/composer_testdir'; $this->ensureDirectoryExistsAndClear($this->root); @@ -46,10 +50,6 @@ class CacheTest extends TestCase public function testRemoveOutdatedFiles() { - if (getenv('TRAVIS')) { - $this->markTestSkipped('Test causes intermittent failures on Travis'); - } - $outdated = array_slice($this->files, 1); $this->finder ->expects($this->once()) @@ -70,10 +70,6 @@ class CacheTest extends TestCase public function testRemoveFilesWhenCacheIsTooLarge() { - if (getenv('TRAVIS')) { - $this->markTestSkipped('Test causes intermittent failures on Travis'); - } - $emptyFinder = $this->getMockBuilder('Symfony\Component\Finder\Finder')->disableOriginalConstructor()->getMock(); $emptyFinder ->expects($this->once())