File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 28
28
*/
29
29
class JsonViewTest extends CakeTestCase {
30
30
31
+ /**
32
+ * setUp method
33
+ *
34
+ * @return void
35
+ **/
31
36
public function setUp () {
32
37
parent ::setUp ();
33
38
Configure::write ('debug ' , 0 );
34
39
}
35
40
41
+ /**
42
+ * tearDown method
43
+ *
44
+ * @return void
45
+ **/
46
+ public function tearDown () {
47
+ parent ::tearDown ();
48
+ restore_error_handler ();
49
+ }
50
+
36
51
/**
37
52
* Generates testRenderWithoutView data.
38
53
*
@@ -324,7 +339,7 @@ public function testRenderWithViewAndNamed() {
324
339
/**
325
340
* JsonViewTest::testRenderInvalidJSON()
326
341
*
327
- * expectedException CakeException
342
+ * @ expectedException CakeException
328
343
* @return void
329
344
*/
330
345
public function testRenderInvalidJSON () {
@@ -336,7 +351,7 @@ public function testRenderInvalidJSON() {
336
351
$ data = array ('data ' => array ('foo ' => 'bar ' . chr ('0x97 ' )));
337
352
338
353
// Use a custom error handler
339
- $ phpUnitErrorHandler = set_error_handler (array ($ this , 'jsonEncodeErrorHandler ' ));
354
+ set_error_handler (array ($ this , 'jsonEncodeErrorHandler ' ));
340
355
341
356
$ Controller ->set ($ data );
342
357
$ Controller ->set ('_serialize ' , 'data ' );
You can’t perform that action at this time.
0 commit comments