mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 09:14:06 +02:00
Add test cases for invalid server configurations
This commit is contained in:
parent
c94eea8294
commit
190ac9501d
2 changed files with 25 additions and 6 deletions
|
|
@ -32,4 +32,20 @@ class Server extends \PHPUnit_Framework_TestCase {
|
|||
$server = new \SMB\Server($this->config->host, uniqid(), $this->config->password);
|
||||
$server->listShares();
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \SMB\AuthenticationException
|
||||
*/
|
||||
public function testWrongPassword() {
|
||||
$server = new \SMB\Server($this->config->host, $this->config->user, uniqid());
|
||||
$server->listShares();
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \SMB\InvalidHostException
|
||||
*/
|
||||
public function testWrongHost() {
|
||||
$server = new \SMB\Server(uniqid(), $this->config->user, $this->config->password);
|
||||
$server->listShares();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue