Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 /* | |
4 * This file is part of the Symfony package. | |
5 * | |
6 * (c) Fabien Potencier <fabien@symfony.com> | |
7 * | |
8 * For the full copyright and license information, please view the LICENSE | |
9 * file that was distributed with this source code. | |
10 */ | |
11 | |
12 namespace Symfony\Component\Finder\Tests\Iterator; | |
13 | |
14 use Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator; | |
15 | |
16 class RecursiveDirectoryIteratorTest extends IteratorTestCase | |
17 { | |
18 /** | |
19 * @group network | |
20 */ | |
21 public function testRewindOnFtp() | |
22 { | |
23 try { | |
24 $i = new RecursiveDirectoryIterator('ftp://speedtest.tele2.net/', \RecursiveDirectoryIterator::SKIP_DOTS); | |
25 } catch (\UnexpectedValueException $e) { | |
26 $this->markTestSkipped('Unsupported stream "ftp".'); | |
27 } | |
28 | |
29 $i->rewind(); | |
30 | |
31 $this->assertTrue(true); | |
32 } | |
33 | |
34 /** | |
35 * @group network | |
36 */ | |
37 public function testSeekOnFtp() | |
38 { | |
39 try { | |
40 $i = new RecursiveDirectoryIterator('ftp://speedtest.tele2.net/', \RecursiveDirectoryIterator::SKIP_DOTS); | |
41 } catch (\UnexpectedValueException $e) { | |
42 $this->markTestSkipped('Unsupported stream "ftp".'); | |
43 } | |
44 | |
45 $contains = array( | |
46 'ftp://speedtest.tele2.net'.DIRECTORY_SEPARATOR.'1000GB.zip', | |
47 'ftp://speedtest.tele2.net'.DIRECTORY_SEPARATOR.'100GB.zip', | |
48 ); | |
49 $actual = array(); | |
50 | |
51 $i->seek(0); | |
52 $actual[] = $i->getPathname(); | |
53 | |
54 $i->seek(1); | |
55 $actual[] = $i->getPathname(); | |
56 | |
57 $this->assertEquals($contains, $actual); | |
58 } | |
59 } |