mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
update tests to new phpunit
This commit is contained in:
parent
743a7bf353
commit
58f6df3807
11 changed files with 59 additions and 101 deletions
|
|
@ -8,13 +8,15 @@
|
|||
namespace Icewind\SMB\Test;
|
||||
|
||||
use Icewind\SMB\BasicAuth;
|
||||
use Icewind\SMB\Exception\ConnectException;
|
||||
use Icewind\SMB\Exception\DependencyException;
|
||||
use Icewind\SMB\Options;
|
||||
use Icewind\SMB\System;
|
||||
use Icewind\SMB\TimeZoneProvider;
|
||||
use Icewind\SMB\Wrapped\Server as NormalServer;
|
||||
|
||||
class ShareTest extends AbstractShareTest {
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->requireBackendEnv('smbclient');
|
||||
$this->config = json_decode(file_get_contents(__DIR__ . '/config.json'));
|
||||
$this->server = new NormalServer(
|
||||
|
|
@ -37,17 +39,13 @@ class ShareTest extends AbstractShareTest {
|
|||
$this->share->mkdir($this->root);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Icewind\SMB\Exception\DependencyException
|
||||
*/
|
||||
public function testAppendStream() {
|
||||
$this->expectException(DependencyException::class);
|
||||
$this->share->append($this->root . '/foo');
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Icewind\SMB\Exception\ConnectException
|
||||
*/
|
||||
public function testHostEscape() {
|
||||
$this->expectException(ConnectException::class);
|
||||
$this->requireBackendEnv('smbclient');
|
||||
$this->config = json_decode(file_get_contents(__DIR__ . '/config.json'));
|
||||
$this->server = new NormalServer(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue