Skip to content
This repository was archived by the owner on May 30, 2025. It is now read-only.

Commit 9db846f

Browse files
committed
better wrong username test again
1 parent 56da52b commit 9db846f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/AbstractShareTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Icewind\SMB\BasicAuth;
1212
use Icewind\SMB\Exception\AccessDeniedException;
1313
use Icewind\SMB\Exception\AlreadyExistsException;
14+
use Icewind\SMB\Exception\ConnectException;
1415
use Icewind\SMB\Exception\ConnectionException;
1516
use Icewind\SMB\Exception\ConnectionRefusedException;
1617
use Icewind\SMB\Exception\FileInUseException;
@@ -788,13 +789,9 @@ public function testWrongUserName() {
788789
$share = $server->getShare($this->config->share);
789790
$share->dir("");
790791
$this->fail("Expected exception");
791-
} catch (AccessDeniedException $e) {
792-
$this->assertTrue(true);
793792
} catch (ForbiddenException $e) {
794793
$this->assertTrue(true);
795-
} catch (ConnectionRefusedException $e) {
796-
$this->assertTrue(true);
797-
} catch (ConnectionException $e) {
794+
} catch (ConnectException $e) {
798795
$this->assertTrue(true);
799796
}
800797
}

0 commit comments

Comments
 (0)