Skip to content

Commit c687b65

Browse files
committed
Merge branch '2.3' into 2.7
* 2.3: Detect Mintty for color support on Windows Add a group for tests of the finder against the FTP server Fix license headers Forbid serializing a Crawler Fix phpdoc block of NativeSessionStorage class Added exception when setAutoInitialize is called when locked [FrameworkBundle] Advanced search templates of bundles [Security] Allow user providers to be defined in many files Use random_bytes function if it is available for random number generation
2 parents 8262ab6 + 11a5cee commit c687b65

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)