Skip to content

Commit

Permalink
See if we can capture the page in the output buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
danrwalker committed Mar 18, 2016
1 parent 64923b2 commit 5a12e27
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/Core/Utilities/Routes.Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@ public function testViewRequest(){
//Capture and test the resulting output
$_SERVER['REQUEST_URI'] = '/test';
$_SERVER['REQUEST_METHOD'] = 'GET';

\Twist::Route()->view('/test','test.tpl');
\Twist::ServeRoutes(false);

ob_start();
\Twist::ServeRoutes(false);
$strPageContent = ob_get_contents();
ob_end_clean();

echo $strPageContent;

$this -> assertEquals('pass','pass');
}
Expand Down

0 comments on commit 5a12e27

Please sign in to comment.