From fd0dd57e7426bcb3238679d05d95e9de4860dd88 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 4 May 2017 07:20:44 -0400 Subject: [PATCH] Filesystem: annotate the one network test with a "network" group. Tests that require network access can be problematic, because they depend on some external state not under your control. That can lead to "random" failures when the code in question actually works fine. The Filesystem component has one such test, and this commit adds it to the "network" group (for PHPUnit). Doing so lets the user skip that particular test, by running phpunit with the --exclude-group flag. We take advantage of this in Gentoo, where every user has the ability to run the test suite but network access is forbidden. --- src/Symfony/Component/Filesystem/Tests/FilesystemTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php index ab2395cd00..b7bdfac415 100644 --- a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php +++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php @@ -156,6 +156,9 @@ class FilesystemTest extends FilesystemTestCase $this->assertEquals('SOURCE FILE', file_get_contents($targetFilePath)); } + /** + * @group network + */ public function testCopyForOriginUrlsAndExistingLocalFileDefaultsToCopy() { $sourceFilePath = 'http://symfony.com/images/common/logo/logo_symfony_header.png';