浏览代码

modify out() to make tests pass on CLI

euromark 13 年之前
父节点
当前提交
6c7064865e
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      TestSuite/MyCakeTestCase.php

+ 4 - 0
TestSuite/MyCakeTestCase.php

@@ -78,6 +78,10 @@ abstract class MyCakeTestCase extends CakeTestCase {
 	 * 2011-12-04 ms
 	 */
 	public static function out($data, $pre = true) {
+		if (PHP_SAPI === 'cli') {
+			return;
+		}
+
 		if ($pre) {
 			pr($data);
 		} else {