Skip to content

Commit dbcfc51

Browse files
committed
Merge branch '2.8'
* 2.8: (28 commits) Detect Mintty for color support on Windows Detect Mintty for color support on Windows [WebProfilerBundle] Fix search button click listener [Form][Type Date/Time] added choice_translation_domain option. Massively simplifying the BC and deprecated-throwing code thanks to suggestions by stof in #15870 Making all "debug" messages use the debug router Making GuardTokenInterface extend TokenInterface Updating behavior to not continue after an authenticator has set the response Add a group for tests of the finder against the FTP server Fix trigger_error calls Fix legacy security tests tweaking message related to configuration edge case that we want to be helpful with Minor tweaks - lowering the required security-http requirement and nulling out a test field Fix license headers Fix license headers Fix license headers Ensure the ClockMock is loaded before using it in the testsuite Allow serializer 3.0 in the PropertyInfo component Add the replace rules for the security-guard component Forbid serializing a Crawler ...
2 parents daa74e0 + 8f87858 commit dbcfc51

File tree

1 file changed

+19
-39
lines changed

1 file changed

+19
-39
lines changed

Tests/Iterator/RecursiveDirectoryIteratorTest.php

Lines changed: 19 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
/*
44
* This file is part of the Symfony package.
5-
*
6-
* (c) Fabien Potencier <[email protected]>
7-
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
10-
*/
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
1111

1212
namespace Symfony\Component\Finder\Tests\Iterator;
1313

@@ -16,42 +16,36 @@
1616
class RecursiveDirectoryIteratorTest extends IteratorTestCase
1717
{
1818
/**
19-
* @dataProvider getPaths
20-
*
21-
* @param string $path
22-
* @param bool $seekable
23-
* @param array $contains
24-
* @param string $message
19+
* @group network
2520
*/
26-
public function testRewind($path, $seekable, $contains, $message = null)
21+
public function testRewindOnFtp()
2722
{
2823
try {
29-
$i = new RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS);
24+
$i = new RecursiveDirectoryIterator('ftp://ftp.mozilla.org/', \RecursiveDirectoryIterator::SKIP_DOTS);
3025
} catch (\UnexpectedValueException $e) {
31-
$this->markTestSkipped(sprintf('Unsupported stream "%s".', $path));
26+
$this->markTestSkipped('Unsupported stream "ftp".');
3227
}
3328

3429
$i->rewind();
3530

36-
$this->assertTrue(true, $message);
31+
$this->assertTrue(true);
3732
}
3833

3934
/**
40-
* @dataProvider getPaths
41-
*
42-
* @param string $path
43-
* @param bool $seekable
44-
* @param array $contains
45-
* @param string $message
35+
* @group network
4636
*/
47-
public function testSeek($path, $seekable, $contains, $message = null)
37+
public function testSeekOnFtp()
4838
{
4939
try {
50-
$i = new RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS);
40+
$i = new RecursiveDirectoryIterator('ftp://ftp.mozilla.org/', \RecursiveDirectoryIterator::SKIP_DOTS);
5141
} catch (\UnexpectedValueException $e) {
52-
$this->markTestSkipped(sprintf('Unsupported stream "%s".', $path));
42+
$this->markTestSkipped('Unsupported stream "ftp".');
5343
}
5444

45+
$contains = array(
46+
'ftp://ftp.mozilla.org'.DIRECTORY_SEPARATOR.'README',
47+
'ftp://ftp.mozilla.org'.DIRECTORY_SEPARATOR.'pub',
48+
);
5549
$actual = array();
5650

5751
$i->seek(0);
@@ -62,18 +56,4 @@ public function testSeek($path, $seekable, $contains, $message = null)
6256

6357
$this->assertEquals($contains, $actual);
6458
}
65-
66-
public function getPaths()
67-
{
68-
$data = array();
69-
70-
// ftp
71-
$contains = array(
72-
'ftp://ftp.mozilla.org'.DIRECTORY_SEPARATOR.'README',
73-
'ftp://ftp.mozilla.org'.DIRECTORY_SEPARATOR.'pub',
74-
);
75-
$data[] = array('ftp://ftp.mozilla.org/', false, $contains);
76-
77-
return $data;
78-
}
7959
}

0 commit comments

Comments
 (0)