mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
Fix running of unit tests
This commit is contained in:
parent
f357ad7b6f
commit
b2edd174f1
3 changed files with 346 additions and 355 deletions
|
|
@ -9,13 +9,7 @@ namespace Icewind\SMB\Test;
|
|||
|
||||
use Icewind\SMB\NativeServer;
|
||||
|
||||
class NativeShare extends Share {
|
||||
|
||||
/**
|
||||
* @var \Icewind\SMB\NativeShare $share
|
||||
*/
|
||||
protected $share;
|
||||
|
||||
class NativeShare extends AbstractShare {
|
||||
public function setUp() {
|
||||
if (!function_exists('smbclient_state_new')) {
|
||||
$this->markTestSkipped('libsmbclient php extension not installed');
|
||||
|
|
@ -30,17 +24,4 @@ class NativeShare extends Share {
|
|||
}
|
||||
$this->share->mkdir($this->root);
|
||||
}
|
||||
|
||||
public function testRestoreErrorHandler() {
|
||||
$handlerCalled = false;
|
||||
set_error_handler(function () use (&$handlerCalled) {
|
||||
$handlerCalled = true;
|
||||
});
|
||||
|
||||
$this->share->dir($this->root);
|
||||
|
||||
trigger_error('dummy');
|
||||
$this->assertTrue($handlerCalled);
|
||||
restore_error_handler();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue