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
|
|
@ -22,6 +22,7 @@
|
|||
namespace Icewind\SMB\Test;
|
||||
|
||||
use Icewind\SMB\AnonymousAuth;
|
||||
use Icewind\SMB\Exception\DependencyException;
|
||||
use Icewind\SMB\IAuth;
|
||||
use Icewind\SMB\Native\NativeServer;
|
||||
use Icewind\SMB\ServerFactory;
|
||||
|
|
@ -32,7 +33,7 @@ class ServerFactoryTest extends TestCase {
|
|||
/** @var IAuth */
|
||||
private $credentials;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->credentials = new AnonymousAuth();
|
||||
|
|
@ -59,10 +60,8 @@ class ServerFactoryTest extends TestCase {
|
|||
$this->assertInstanceOf(NativeServer::class, $factory->createServer('localhost', $this->credentials));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Icewind\SMB\Exception\DependencyException
|
||||
*/
|
||||
public function testNoBackend() {
|
||||
$this->expectException(DependencyException::class);
|
||||
$this->requireBackendEnv('smbclient');
|
||||
$system = $this->getMockBuilder(System::class)
|
||||
->setMethods(['libSmbclientAvailable', 'getSmbclientPath'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue