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.
This commit is contained in:
Michael Orlitzky 2017-05-04 07:20:44 -04:00 committed by Fabien Potencier
parent 0c4e549fa1
commit fd0dd57e74
1 changed files with 3 additions and 0 deletions

View File

@ -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';