diff options
Diffstat (limited to 'tests/lib/AppFramework/Http/OutputTest.php')
-rw-r--r-- | tests/lib/AppFramework/Http/OutputTest.php | 30 |
1 files changed, 30 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..2ba93833dd1 --- /dev/null +++ b/tests/lib/AppFramework/Http/OutputTest.php @@ -0,0 +1,30 @@ +<?php + +/** + * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +namespace Test\AppFramework\Http; + +use OC\AppFramework\Http\Output; + +class OutputTest extends \Test\TestCase { + public function testSetOutput(): void { + $this->expectOutputString('foo'); + $output = new Output(''); + $output->setOutput('foo'); + } + + public function testSetReadfile(): void { + $this->expectOutputString(file_get_contents(__FILE__)); + $output = new Output(''); + $output->setReadfile(__FILE__); + } + + public function testSetReadfileStream(): void { + $this->expectOutputString(file_get_contents(__FILE__)); + $output = new Output(''); + $output->setReadfile(fopen(__FILE__, 'r')); + } +} |