Skip to content

Commit fd0dd57

Browse files
orlitzkyfabpot
authored andcommitted
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.
1 parent 0c4e549 commit fd0dd57

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Symfony/Component/Filesystem/Tests/FilesystemTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ public function testCopyCreatesTargetDirectoryIfItDoesNotExist()
156156
$this->assertEquals('SOURCE FILE', file_get_contents($targetFilePath));
157157
}
158158

159+
/**
160+
* @group network
161+
*/
159162
public function testCopyForOriginUrlsAndExistingLocalFileDefaultsToCopy()
160163
{
161164
$sourceFilePath = 'http://symfony.com/images/common/logo/logo_symfony_header.png';

0 commit comments

Comments
 (0)