Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
[zendframework/zendframework#1] fix errant string output in tests
Browse files Browse the repository at this point in the history
- added an expectOutputString() call to ensure output is trapped
  • Loading branch information
weierophinney committed Feb 21, 2012
1 parent be371bf commit bfd5623
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test/Helper/RenderChildModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,12 @@ public function testRendersSequentialChildrenWithNestedChildren()
$this->assertRegExp('/Content:\s+Layout start\s+Content for layout\s+Layout end\s+Sidebar:\s+Second child/s', $result, $result);
}

/**
* @outputBuffering enabled
*/
public function testAttemptingToRenderWithNoCurrentModelRaisesException()
{
$renderer = new PhpRenderer();
$renderer->setResolver($this->resolver);
$this->setExpectedException('Zend\View\Exception\RuntimeException', 'no view model');
$this->expectOutputString("Layout start\n\n");
$renderer->render('layout');
}
}

0 comments on commit bfd5623

Please sign in to comment.