38 lines
		
	
	
		
			711 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			711 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * @author Daniel J. Summers <daniel@bitbadger.solutions>
 | |
|  * @license MIT
 | |
|  */
 | |
| 
 | |
| 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;
 | |
|     }
 | |
| }
 |