mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
Move to PSR-4 for autoloading
This commit is contained in:
parent
7adbe91c9a
commit
46e2daf1ee
12 changed files with 55 additions and 56 deletions
|
|
@ -4,7 +4,7 @@ namespace SMB\Test;
|
|||
|
||||
class Server extends \PHPUnit_Framework_TestCase {
|
||||
/**
|
||||
* @var \SMB\Server $server
|
||||
* @var \Icewind\SMB\Server $server
|
||||
*/
|
||||
private $server;
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ class Server extends \PHPUnit_Framework_TestCase {
|
|||
|
||||
public function setUp() {
|
||||
$this->config = json_decode(file_get_contents(__DIR__ . '/config.json'));
|
||||
$this->server = new \SMB\Server($this->config->host, $this->config->user, $this->config->password);
|
||||
$this->server = new \Icewind\SMB\Server($this->config->host, $this->config->user, $this->config->password);
|
||||
}
|
||||
|
||||
public function testListShares() {
|
||||
|
|
@ -26,31 +26,31 @@ class Server extends \PHPUnit_Framework_TestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @expectedException \SMB\AuthenticationException
|
||||
* @expectedException \Icewind\SMB\AuthenticationException
|
||||
*/
|
||||
public function testWrongUserName() {
|
||||
$server = new \SMB\Server($this->config->host, uniqid(), $this->config->password);
|
||||
$server = new \Icewind\SMB\Server($this->config->host, uniqid(), $this->config->password);
|
||||
$server->listShares();
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \SMB\AuthenticationException
|
||||
* @expectedException \Icewind\SMB\AuthenticationException
|
||||
*/
|
||||
public function testWrongPassword() {
|
||||
$server = new \SMB\Server($this->config->host, $this->config->user, uniqid());
|
||||
$server = new \Icewind\SMB\Server($this->config->host, $this->config->user, uniqid());
|
||||
$server->listShares();
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \SMB\InvalidHostException
|
||||
* @expectedException \Icewind\SMB\InvalidHostException
|
||||
*/
|
||||
public function testWrongHost() {
|
||||
$server = new \SMB\Server(uniqid(), $this->config->user, $this->config->password);
|
||||
$server = new \Icewind\SMB\Server(uniqid(), $this->config->user, $this->config->password);
|
||||
$server->listShares();
|
||||
}
|
||||
|
||||
public function testGetTimeZone() {
|
||||
$timeZone = $this->server->getTimeZone();
|
||||
$this->assertEquals('+0100', $timeZone);
|
||||
$this->assertEquals('+0200', $timeZone);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue