nextcloud/tests/lib/AppFramework/Http/OutputTest.php
Ferdinand Thiessen 5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +02:00

30 lines
738 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(): 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'));
}
}