Skip to content

Commit

Permalink
Retry FTP cases
Browse files Browse the repository at this point in the history
  • Loading branch information
frankdejonge committed May 15, 2021
1 parent f1ecc5c commit da44934
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/Ftp/FtpAdapterTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ public function resetFunctionMocks(): void
*/
public function reconnecting_after_failure(): void
{
$adapter = $this->adapter();
static::$connectivityChecker->failNextCall();
$this->runScenario(function () {
$adapter = $this->adapter();
static::$connectivityChecker->failNextCall();

$contents = iterator_to_array($adapter->listContents('', false));
$this->assertIsArray($contents);
$contents = iterator_to_array($adapter->listContents('', false));
$this->assertIsArray($contents);
});
}

/**
Expand All @@ -60,7 +62,9 @@ public function reconnecting_after_failure(): void
*/
public function failing_to_write_a_file(callable $scenario): void
{
$scenario();
$this->runScenario(function () use ($scenario) {
$scenario();
});

$this->expectException(UnableToWriteFile::class);

Expand Down

0 comments on commit da44934

Please sign in to comment.