You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
735 B
PHP

<?php
namespace Bsr\Webservice;
use Bsr\Webservice\Formatter\Formatter;
use PHPUnit\Framework\TestCase;
class RendererTest extends TestCase
{
private $someData = array(
200 => 'Ok',
400 => 'Bad request',
404 => 'Not Found',
403 => 'Not Authorized',
500 => 'Server Error',
);
public function testThatOutputBufferGetsInializedOnConstruction()
{
$text = 'This text should be captured by the renderers ob_start()';
ob_start();
echo 'Rubish text, that is not intended to be outputed';
ob_get_clean();
$renderer = new Renderer();
echo $text;
$obcontent = ob_get_clean();
$this->assertSame($text, $obcontent);
}
}