Skip to content

Commit

Permalink
Merge branch '5.4' into 6.4
Browse files Browse the repository at this point in the history
* 5.4:
  Replace external FTP server by a local docker instance
  [PhpUnitBridge][Console][VarDumper] Fix handling NO_COLOR env var
  • Loading branch information
nicolas-grekas committed Aug 13, 2024
2 parents cc9d880 + ae25a91 commit d7eb6da
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions Tests/Iterator/RecursiveDirectoryIteratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,38 @@ protected function setUp(): void

/**
* @group network
* @group integration
*/
public function testRewindOnFtp()
{
$i = new RecursiveDirectoryIterator('ftp://test.rebex.net/', \RecursiveDirectoryIterator::SKIP_DOTS);
if (!getenv('INTEGRATION_FTP_URL')) {
self::markTestSkipped('INTEGRATION_FTP_URL env var is not defined.');
}

$i = new RecursiveDirectoryIterator(getenv('INTEGRATION_FTP_URL').\DIRECTORY_SEPARATOR, \RecursiveDirectoryIterator::SKIP_DOTS);

$i->rewind();

$this->assertTrue(true);
$this->expectNotToPerformAssertions();
}

/**
* @group network
* @group integration
*/
public function testSeekOnFtp()
{
$i = new RecursiveDirectoryIterator('ftp://test.rebex.net/', \RecursiveDirectoryIterator::SKIP_DOTS);
if (!getenv('INTEGRATION_FTP_URL')) {
self::markTestSkipped('INTEGRATION_FTP_URL env var is not defined.');
}

$ftpUrl = getenv('INTEGRATION_FTP_URL');

$i = new RecursiveDirectoryIterator($ftpUrl.\DIRECTORY_SEPARATOR, \RecursiveDirectoryIterator::SKIP_DOTS);

$contains = [
'ftp://test.rebex.net'.\DIRECTORY_SEPARATOR.'pub',
'ftp://test.rebex.net'.\DIRECTORY_SEPARATOR.'readme.txt',
$ftpUrl.\DIRECTORY_SEPARATOR.'pub',
$ftpUrl.\DIRECTORY_SEPARATOR.'readme.txt',
];
$actual = [];

Expand Down

0 comments on commit d7eb6da

Please sign in to comment.