Moved API\Notification tests

This commit is contained in:
Philipp
2021-11-12 21:35:21 +01:00
parent f2ca21935e
commit 6725f05ab2
8 changed files with 161 additions and 86 deletions

View File

@@ -0,0 +1,54 @@
<?php
namespace Friendica\Test\Util;
use Friendica\Module\Api\ApiResponse;
class ApiResponseDouble extends ApiResponse
{
/**
* The header list
*
* @var string[]
*/
protected static $header = [];
/**
* The printed output
*
* @var string
*/
protected static $output = '';
/**
* @return string[]
*/
public static function getHeader(): array
{
return static::$header;
}
/**
* @return string
*/
public static function getOutput(): string
{
return static::$output;
}
public static function reset()
{
self::$output = '';
self::$header = [];
}
protected function setHeader(string $header)
{
static::$header[] = $header;
}
protected function printOutput(string $output)
{
static::$output .= $output;
}
}