aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-11-16 10:58:24 +0100
committerRobin Appelman <robin@icewind.nl>2016-11-16 15:30:37 +0100
commite4d1cf0f6db28ba371c9b1ce1cbbe35d535f8c8d (patch)
treead812a6c2ac373518ae01b8aca4d4d840fb18154 /tests
parentd5bfff6f4f85a0fcc5f28b7a39ef3b0266fd7db2 (diff)
downloadnextcloud-server-e4d1cf0f6db28ba371c9b1ce1cbbe35d535f8c8d.tar.gz
nextcloud-server-e4d1cf0f6db28ba371c9b1ce1cbbe35d535f8c8d.zip
add tests for http/output
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/AppFramework/Http/OutputTest.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/lib/AppFramework/Http/OutputTest.php b/tests/lib/AppFramework/Http/OutputTest.php
new file mode 100644
index 00000000000..5fe35d24bde
--- /dev/null
+++ b/tests/lib/AppFramework/Http/OutputTest.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Copyright (c) 2016 Robin Appelman <robin@icewind.nl>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace Test\AppFramework\Http;
+
+use OC\AppFramework\Http\Output;
+
+class OutputTest extends \Test\TestCase {
+ public function testSetOutput() {
+ $this->expectOutputString('foo');
+ $output = new Output('');
+ $output->setOutput('foo');
+ }
+
+ public function testSetReadfile() {
+ $this->expectOutputString(file_get_contents(__FILE__));
+ $output = new Output('');
+ $output->setReadfile(__FILE__);
+ }
+
+ public function testSetReadfileStream() {
+ $this->expectOutputString(file_get_contents(__FILE__));
+ $output = new Output('');
+ $output->setReadfile(fopen(__FILE__, 'r'));
+ }
+}