mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
Restore error handling after using libsmbclient-php
This commit is contained in:
parent
32f54c925b
commit
5f80502017
3 changed files with 68 additions and 12 deletions
|
|
@ -6,7 +6,6 @@ require_once 'share.php';
|
|||
|
||||
class NativeShare extends Share {
|
||||
|
||||
|
||||
/**
|
||||
* @var \Icewind\SMB\NativeShare $share
|
||||
*/
|
||||
|
|
@ -26,4 +25,17 @@ 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