fix risky tests

This commit is contained in:
Robin Appelman 2020-07-20 16:12:51 +02:00
commit 507b186800
2 changed files with 14 additions and 14 deletions

View file

@ -8,6 +8,7 @@
namespace Icewind\SMB\Test;
use Icewind\SMB\BasicAuth;
use Icewind\SMB\IShare;
use Icewind\SMB\Options;
use Icewind\SMB\System;
use Icewind\SMB\TimeZoneProvider;
@ -39,12 +40,11 @@ class ServerTest extends TestCase {
public function testListShares() {
$shares = $this->server->listShares();
foreach ($shares as $share) {
if ($share->getName() === $this->config->share) {
return;
}
}
$this->fail('Share "' . $this->config->share . '" not found');
$names = array_map(function (IShare $share) {
return $share->getName();
}, $shares);
$this->assertContains($this->config->share, $names);
}
/**