explicity set protocol in test

This commit is contained in:
Robin Appelman 2025-10-26 02:50:20 +02:00
commit 7f6eafacfc
2 changed files with 108 additions and 102 deletions

View file

@ -7,6 +7,7 @@
namespace Icewind\SMB\Test;
use Icewind\SMB\BasicAuth;
use Icewind\SMB\IOptions;
use Icewind\SMB\Native\NativeServer;
use Icewind\SMB\Options;
use Icewind\SMB\System;
@ -36,6 +37,9 @@ class NativeStreamTest extends TestCase {
$this->markTestSkipped('libsmbclient php extension not installed');
}
$this->config = json_decode(file_get_contents(__DIR__ . '/config.json'));
$options = new Options();
$options->setMinProtocol(IOptions::PROTOCOL_SMB2);
$options->setMaxProtocol(IOptions::PROTOCOL_SMB3);
$this->server = new NativeServer(
$this->config->host,
new BasicAuth(
@ -45,7 +49,7 @@ class NativeStreamTest extends TestCase {
),
new System(),
new TimeZoneProvider(new System()),
new Options()
$options
);
$this->share = $this->server->getShare($this->config->share);
if ($this->config->root) {