Fix running of unit tests

This commit is contained in:
Robin Appelman 2014-07-29 23:49:04 +02:00
commit b2edd174f1
3 changed files with 346 additions and 355 deletions

View file

@ -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();
}
}