Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ignaszak committed Mar 21, 2016
1 parent 71616a1 commit a5715b3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Start.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ private function errorReporting()

private function setObStart()
{
ob_start();
if (@TEST_MODE !== true) {
ob_start();
}
}
}
6 changes: 6 additions & 0 deletions tests/StartTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,14 @@ public function testCatchException()
$this->start->catchException(new \Exception('Any Exception'));
}

/**
* @runInSeparateProcess
*/
public function testRunOnDevAndUserMode()
{
if (!defined('TEST_MODE')) {
define('TEST_MODE', true);
}
$stub = $this->getMockBuilder('Ignaszak\Exception\Handler\ErrorHandler')
->getMock();
$stub->expects($this->once())->method('setErrorHandler');
Expand Down

0 comments on commit a5715b3

Please sign in to comment.