public function RecursiveDirectoryIteratorTest::testSeekOnFtp in Database Sanitize 7
@group network
File
- vendor/
symfony/ finder/ Tests/ Iterator/ RecursiveDirectoryIteratorTest.php, line 37
Class
Namespace
Symfony\Component\Finder\Tests\IteratorCode
public function testSeekOnFtp() {
try {
$i = new RecursiveDirectoryIterator('ftp://speedtest.tele2.net/', \RecursiveDirectoryIterator::SKIP_DOTS);
} catch (\UnexpectedValueException $e) {
$this
->markTestSkipped('Unsupported stream "ftp".');
}
$contains = array(
'ftp://speedtest.tele2.net' . \DIRECTORY_SEPARATOR . '1000GB.zip',
'ftp://speedtest.tele2.net' . \DIRECTORY_SEPARATOR . '100GB.zip',
);
$actual = array();
$i
->seek(0);
$actual[] = $i
->getPathname();
$i
->seek(1);
$actual[] = $i
->getPathname();
$this
->assertEquals($contains, $actual);
}