diff --git a/src/Wrapped/Share.php b/src/Wrapped/Share.php index 8cfae89..c7e78fd 100644 --- a/src/Wrapped/Share.php +++ b/src/Wrapped/Share.php @@ -345,21 +345,14 @@ class Share extends AbstractShare { /** * Append to stream - * Note: smbclient does not support it so we use php-libsmbclient + * Note: smbclient does not support this (Use php-libsmbclient) * * @param string $target * * @throws \Icewind\SMB\Exception\DependencyException - * @throws \Icewind\SMB\Exception\NotFoundException - * @throws \Icewind\SMB\Exception\InvalidTypeException */ public function append($target) { - if (!NativeServer::available($this->server->getSystem())) { - throw new DependencyException('php-libsmbclient not installed'); - } - - $share = new NativeShare($this->server, $this->getName()); - return $share->append($target); + throw new DependencyException('php-libsmbclient not installed'); } /** diff --git a/tests/ShareTest.php b/tests/ShareTest.php index 640b6aa..fc30198 100644 --- a/tests/ShareTest.php +++ b/tests/ShareTest.php @@ -37,6 +37,13 @@ class ShareTest extends AbstractShareTest { $this->share->mkdir($this->root); } + /** + * @expectedException \Icewind\SMB\Exception\DependencyException + */ + public function testAppendStream() { + $this->share->append($this->root . '/foo'); + } + /** * @expectedException \Icewind\SMB\Exception\ConnectException */