summaryrefslogtreecommitdiffstats
path: root/apps/files_external/3rdparty/icewind/streams/tests/NullWrapper.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/3rdparty/icewind/streams/tests/NullWrapper.php')
-rw-r--r--apps/files_external/3rdparty/icewind/streams/tests/NullWrapper.php59
1 files changed, 0 insertions, 59 deletions
diff --git a/apps/files_external/3rdparty/icewind/streams/tests/NullWrapper.php b/apps/files_external/3rdparty/icewind/streams/tests/NullWrapper.php
deleted file mode 100644
index ba42b4dfea1..00000000000
--- a/apps/files_external/3rdparty/icewind/streams/tests/NullWrapper.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-/**
- * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
- * This file is licensed under the Licensed under the MIT license:
- * http://opensource.org/licenses/MIT
- */
-
-namespace Icewind\Streams\Tests;
-
-class NullWrapper extends Wrapper {
-
- /**
- * @param resource $source
- * @return resource
- */
- protected function wrapSource($source) {
- return \Icewind\Streams\NullWrapper::wrap($source);
- }
-
- /**
- * @expectedException \BadMethodCallException
- */
- public function testNoContext() {
- stream_wrapper_register('null', '\Icewind\Streams\NullWrapper');
- $context = stream_context_create(array());
- try {
- fopen('null://', 'r+', false, $context);
- stream_wrapper_unregister('null');
- } catch (\Exception $e) {
- stream_wrapper_unregister('null');
- throw $e;
- }
- }
-
- /**
- * @expectedException \BadMethodCallException
- */
- public function testNoSource() {
- stream_wrapper_register('null', '\Icewind\Streams\NullWrapper');
- $context = stream_context_create(array(
- 'null' => array(
- 'source' => 'bar'
- )
- ));
- try {
- fopen('null://', 'r+', false, $context);
- } catch (\Exception $e) {
- stream_wrapper_unregister('null');
- throw $e;
- }
- }
-
- /**
- * @expectedException \BadMethodCallException
- */
- public function testWrapInvalidSource() {
- $this->wrapSource('foo');
- }
-}