]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - tests/PHPUnit/Tests/Regression/Issue578Test.php
Added unit tests.
[Github/sugarcrm.git] / tests / PHPUnit / Tests / Regression / Issue578Test.php
1 <?php
2 require_once 'PHPUnit/Framework/TestCase.php';
3
4 class Issue578Test extends PHPUnit_Framework_TestCase
5 {
6     public function testNoticesDoublePrintStackTrace()
7     {
8         $this->iniSet('error_reporting', E_ALL | E_NOTICE);
9         trigger_error('Stack Trace Test Notice', E_NOTICE);
10     }
11
12     public function testWarningsDoublePrintStackTrace()
13     {
14         $this->iniSet('error_reporting', E_ALL | E_NOTICE);
15         trigger_error('Stack Trace Test Notice', E_WARNING);
16     }
17
18     public function testUnexpectedExceptionsPrintsCorrectly()
19     {
20         throw new Exception('Double printed exception');
21     }
22 }