From c0236c5ed2e91ce4665d2411315379c49edefba8 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Thu, 22 Oct 2020 10:14:17 +0200 Subject: [PATCH] Move slow integration test to separate fixtures directory and add to slow group --- .../github-issues-7665.test | 0 tests/Composer/Test/InstallerTest.php | 21 ++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) rename tests/Composer/Test/Fixtures/{installer => installer-slow}/github-issues-7665.test (100%) diff --git a/tests/Composer/Test/Fixtures/installer/github-issues-7665.test b/tests/Composer/Test/Fixtures/installer-slow/github-issues-7665.test similarity index 100% rename from tests/Composer/Test/Fixtures/installer/github-issues-7665.test rename to tests/Composer/Test/Fixtures/installer-slow/github-issues-7665.test diff --git a/tests/Composer/Test/InstallerTest.php b/tests/Composer/Test/InstallerTest.php index 88fa31f6e..39bfc730f 100644 --- a/tests/Composer/Test/InstallerTest.php +++ b/tests/Composer/Test/InstallerTest.php @@ -184,6 +184,15 @@ class InstallerTest extends TestCase return $cases; } + /** + * @group slow + * @dataProvider getSlowIntegrationTests + */ + public function testSlowIntegration($file, $message, $condition, $composerConfig, $lock, $installed, $run, $expectLock, $expectInstalled, $expectOutput, $expect, $expectResult) + { + return $this->testIntegration($file, $message, $condition, $composerConfig, $lock, $installed, $run, $expectLock, $expectInstalled, $expectOutput, $expect, $expectResult); + } + /** * @dataProvider getIntegrationTests */ @@ -379,9 +388,19 @@ class InstallerTest extends TestCase } } + public function getSlowIntegrationTests() + { + return $this->loadIntegrationTests('installer-slow/'); + } + public function getIntegrationTests() { - $fixturesDir = realpath(__DIR__.'/Fixtures/installer/'); + return $this->loadIntegrationTests('installer/'); + } + + public function loadIntegrationTests($path) + { + $fixturesDir = realpath(__DIR__.'/Fixtures/'.$path); $tests = array(); foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($fixturesDir), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) {