move backends into their own namespace and add support for multiple auth methods

This commit is contained in:
Robin Appelman 2018-03-13 16:18:37 +01:00
commit 29bdebad42
33 changed files with 752 additions and 377 deletions

View file

@ -7,10 +7,14 @@
namespace Icewind\SMB\Test;
use Icewind\SMB\BasicAuth;
use Icewind\SMB\Change;
use Icewind\SMB\Exception\AlreadyExistsException;
use Icewind\SMB\INotifyHandler;
use Icewind\SMB\IShare;
use Icewind\SMB\System;
use Icewind\SMB\TimeZoneProvider;
use Icewind\SMB\Wrapped\Server;
class NotifyHandlerTest extends TestCase {
/**
@ -23,7 +27,15 @@ class NotifyHandlerTest extends TestCase {
public function setUp() {
$this->requireBackendEnv('smbclient');
$this->config = json_decode(file_get_contents(__DIR__ . '/config.json'));
$this->server = new \Icewind\SMB\Server($this->config->host, $this->config->user, $this->config->password);
$this->server = new Server(
$this->config->host,
new BasicAuth(
$this->config->user,
$this->config->password
),
new System(),
new TimeZoneProvider($this->config->host, new System())
);
}
/**