class RecursiveDirectoryIteratorTest in Database Sanitize 7
Hierarchy
- class \Symfony\Component\Finder\Tests\Iterator\IteratorTestCase extends \PHPUnit\Framework\TestCase
- class \Symfony\Component\Finder\Tests\Iterator\RecursiveDirectoryIteratorTest
Expanded class hierarchy of RecursiveDirectoryIteratorTest
File
- vendor/
symfony/ finder/ Tests/ Iterator/ RecursiveDirectoryIteratorTest.php, line 16
Namespace
Symfony\Component\Finder\Tests\IteratorView source
class RecursiveDirectoryIteratorTest extends IteratorTestCase {
/**
* @group network
*/
public function testRewindOnFtp() {
try {
$i = new RecursiveDirectoryIterator('ftp://speedtest.tele2.net/', \RecursiveDirectoryIterator::SKIP_DOTS);
} catch (\UnexpectedValueException $e) {
$this
->markTestSkipped('Unsupported stream "ftp".');
}
$i
->rewind();
$this
->assertTrue(true);
}
/**
* @group network
*/
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);
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
IteratorTestCase:: |
protected | function | ||
IteratorTestCase:: |
protected | function | Same as IteratorTestCase::assertIterator with foreach usage. | |
IteratorTestCase:: |
protected | function | ||
IteratorTestCase:: |
protected | function | Same as assertOrderedIterator, but checks the order of groups of array elements. | |
IteratorTestCase:: |
protected | function | Same as IteratorTestCase::assertOrderedIterator with foreach usage. | |
RecursiveDirectoryIteratorTest:: |
public | function | @group network | |
RecursiveDirectoryIteratorTest:: |
public | function | @group network |