コード例 #1
0
 /**
  * @dataProvider getPaths
  *
  * @param string $path
  * @param bool   $seekable
  * @param bool   $contains
  * @param string $message
  */
 public function testRewind($path, $seekable, $contains, $message = null)
 {
     try {
         $i = new RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS);
     } catch (\UnexpectedValueException $e) {
         $this->markTestSkipped(sprintf('Unsupported stream "%s".', $path));
     }
     $i->rewind();
     $this->assertTrue(true, $message);
 }
コード例 #2
0
 /**
  * @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);
 }