mirror of
https://github.com/nextcloud/server.git
synced 2025-05-07 15:21:33 +00:00
30 lines
720 B
PHP
30 lines
720 B
PHP
<?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() {
|
|
$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'));
|
|
}
|
|
}
|