diff --git a/lib/Cake/Test/Case/View/JsonViewTest.php b/lib/Cake/Test/Case/View/JsonViewTest.php index fb7955c1a8c..06c4f020897 100644 --- a/lib/Cake/Test/Case/View/JsonViewTest.php +++ b/lib/Cake/Test/Case/View/JsonViewTest.php @@ -28,11 +28,26 @@ */ class JsonViewTest extends CakeTestCase { +/** + * setUp method + * + * @return void + **/ public function setUp() { parent::setUp(); Configure::write('debug', 0); } +/** + * tearDown method + * + * @return void + **/ + public function tearDown() { + parent::tearDown(); + restore_error_handler(); + } + /** * Generates testRenderWithoutView data. * @@ -324,7 +339,7 @@ public function testRenderWithViewAndNamed() { /** * JsonViewTest::testRenderInvalidJSON() * - * expectedException CakeException + * @expectedException CakeException * @return void */ public function testRenderInvalidJSON() { @@ -336,7 +351,7 @@ public function testRenderInvalidJSON() { $data = array('data' => array('foo' => 'bar' . chr('0x97'))); // Use a custom error handler - $phpUnitErrorHandler = set_error_handler(array($this, 'jsonEncodeErrorHandler')); + set_error_handler(array($this, 'jsonEncodeErrorHandler')); $Controller->set($data); $Controller->set('_serialize', 'data');