v2.1 (#10)
- Add `Json` string and output functions - Add documentation for these functions Reviewed-on: #10
This commit was merged in pull request #10.
This commit is contained in:
38
tests/Integration/DocumentTestCase.php
Normal file
38
tests/Integration/DocumentTestCase.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel J. Summers <daniel@bitbadger.solutions>
|
||||
* @license MIT
|
||||
* @see https://github.com/Zaid-Ajaj/ThrowawayDb The origin concept
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Test\Integration;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* Base test case class for document integration tests
|
||||
*/
|
||||
class DocumentTestCase extends TestCase
|
||||
{
|
||||
/**
|
||||
* Clear the output buffer
|
||||
*/
|
||||
public function clearBuffer(): void
|
||||
{
|
||||
ob_clean();
|
||||
ob_start();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the contents of the output buffer and end buffering
|
||||
*
|
||||
* @return string The contents of the output buffer
|
||||
*/
|
||||
public function getBufferContents(): string {
|
||||
$contents = ob_get_contents();
|
||||
ob_end_clean();
|
||||
return $contents;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user