Browse Source

remove debug statements

euromark 13 years ago
parent
commit
d01390f7ef

+ 2 - 2
Test/Case/Lib/GeocodeLibTest.php

@@ -51,7 +51,7 @@ class GeocodeLibTest extends MyCakeTestCase {
 		);
 		foreach ($coords as $coord) {
 			$is = $this->Geocode->blur($coord[0], $coord[1]);
-			//pr('is: '.$is.' - expected: '.$coord[0].' +- '.$coord[2]); ob_flush();
+			//pr('is: '.$is.' - expected: '.$coord[0].' +- '.$coord[2]);
 			$this->assertWithinMargin($is, $coord[0], $coord[2]);
 			$this->assertNotWithinMargin($is, $coord[0], $coord[2] / 4);
 		}
@@ -237,7 +237,7 @@ class GeocodeLibTest extends MyCakeTestCase {
 
 			$is = $this->Geocode->getResult();
 			$this->assertTrue(!empty($is));
-			//debug($is); ob_flush();
+			//debug($is);
 			$address = isset($is[0]) ? $is[0]['formatted_address'] : $is['formatted_address'];
 			$this->assertTextContains($coord[2], $address);
 		}

+ 7 - 7
Test/Case/Lib/GooglLibTest.php

@@ -27,7 +27,7 @@ class GooglLibTest extends CakeTestCase {
 		$this->skipIf(true);
 
 		$is = $this->Googl->getHistory();
-		pr($is); ob_flush();
+		pr($is);
 		die();
 	}
 
@@ -38,7 +38,7 @@ class GooglLibTest extends CakeTestCase {
 
 		$url = 'http://www.spiegel.de';
 		$is = $this->Googl->getShort($url);
-		pr($is); ob_flush();
+		pr($is);
 		$res = $this->assertTrue(!empty($is) && is_array($is) && !empty($is['id']) && $is['kind'] === 'urlshortener#url' && $is['longUrl'] == $url.'/');
 
 
@@ -46,7 +46,7 @@ class GooglLibTest extends CakeTestCase {
 
 		$shortUrl = $is['id'];
 		$is = $this->Googl->getLong($shortUrl);
-		pr($is); ob_flush();
+		pr($is);
 		$res = $this->assertTrue(!empty($is) && is_array($is) && !empty($is['id']) && $is['kind'] === 'urlshortener#url' && $is['status'] === 'OK' && $is['longUrl'] == $url.'/');
 
 	}
@@ -58,7 +58,7 @@ class GooglLibTest extends CakeTestCase {
 
 		$url = 'http://www.gmx.de';
 		$is = $this->Googl->getShort($url);
-		pr($is); ob_flush();
+		pr($is);
 		$res = $this->assertTrue(!empty($is) && is_array($is) && !empty($is['id']) && $is['kind'] === 'urlshortener#url' && $is['longUrl'] == $url.'/');
 
 
@@ -66,7 +66,7 @@ class GooglLibTest extends CakeTestCase {
 
 		$shortUrl = $is['id'];
 		$is = $this->Googl->getLong($shortUrl);
-		pr($is); ob_flush();
+		pr($is);
 		$res = $this->assertTrue(!empty($is) && is_array($is) && !empty($is['id']) && $is['kind'] === 'urlshortener#url' && $is['status'] === 'OK' && $is['longUrl'] == $url.'/');
 
 
@@ -74,13 +74,13 @@ class GooglLibTest extends CakeTestCase {
 
 		$url = 'http://www.web.de#123456';
 		$is = $this->Googl->getShort($url);
-		debug($is); ob_flush();
+		debug($is);
 		$res = $this->assertTrue(!empty($is) && is_array($is) && !empty($is['id']) && $is['kind'] === 'urlshortener#url' && $is['longUrl'] === 'http://www.web.de/#123456');
 
 		$shortUrl = $is['id'];
 		$is = $this->Googl->getLong($shortUrl, GooglLib::PROJECTION_CLICKS);
 
-		debug($is); ob_flush();
+		debug($is);
 		$res = $this->assertTrue(!empty($is) && is_array($is) && !empty($is['id']) && $is['kind'] === 'urlshortener#url' && $is['status'] === 'OK' && $is['longUrl'] === 'http://www.web.de/#123456');
 
 	}

+ 0 - 1
Test/Case/Lib/IcalLibTest.php

@@ -69,7 +69,6 @@ class IcalLibTest extends CakeTestCase {
 			echo date(FORMAT_NICE_YMD, $i).': '.h($val).BR;
 		}
 		$this->assertTrue(!empty($is));
-		ob_flush();
 	}
 
 }

+ 3 - 3
Test/Case/Lib/ImapLibTest.php

@@ -41,7 +41,7 @@ class ImapLibTest extends MyCakeTestCase {
 
 	public function testCount() {
 		$count = $this->_count();
-		debug($count); ob_flush();
+		debug($count);
 		$this->assertSame(0, $count);
 	}
 
@@ -51,7 +51,7 @@ class ImapLibTest extends MyCakeTestCase {
 		sleep(2);
 
 		$messages = $this->_read();
-		debug($messages); ob_flush();
+		debug($messages);
 		$this->assertTrue(!empty($messages));
 		$message = array_shift($messages);
 		$this->assertTrue(!empty($message['subject']));
@@ -63,7 +63,7 @@ class ImapLibTest extends MyCakeTestCase {
 		sleep(2);
 
 		$messages = $this->_read();
-		debug($messages); ob_flush();
+		debug($messages);
 		$this->assertTrue(!empty($messages));
 		$message = array_shift($messages);
 		$this->assertTrue(!empty($message['subject']));

+ 0 - 4
Test/Case/Lib/SpellLibTest.php

@@ -53,8 +53,6 @@ class SpellLibTest extends MyCakeTestCase {
 		$word = 'bird';
 		$res = $this->SpellLib->check($word);
 		$this->assertTrue($res);
-
-		ob_flush();
 	}
 
 	public function testGerman() {
@@ -75,8 +73,6 @@ class SpellLibTest extends MyCakeTestCase {
 		$word = 'Mäuse';
 		$res = $this->SpellLib->check($word);
 		$this->assertTrue($res);
-
-		ob_flush();
 	}
 
 	public function testConfigureConfiguration() {

+ 1 - 1
Test/Case/Lib/Utility/NumberLibTest.php

@@ -81,7 +81,7 @@ class NumberLibTest extends MyCakeTestCase {
 		);
 		foreach ($values as $was => $expected) {
 			$is = NumberLib::roundTo($was, 10);
-			//debug($expected); debug($is); echo BR; ob_flush();
+			//debug($expected); debug($is); echo BR;
 
 			$this->assertSame($expected, $is, null, $was);
 		}

+ 3 - 3
Test/Case/Lib/Utility/TimeLibTest.php

@@ -23,7 +23,7 @@ class TimeLibTest extends MyCakeTestCase {
 		);
 		foreach ($values as $v) {
 			$ret = TimeLib::niceDate($v[0], $v[1]);
-			pr($ret); ob_flush();
+			pr($ret);
 			$this->assertEquals($ret, $v[2]);
 		}
 	}
@@ -38,7 +38,7 @@ class TimeLibTest extends MyCakeTestCase {
 		);
 		foreach ($values as $v) {
 			$ret = TimeLib::localDate($v[0], $v[1]);
-			pr($ret); ob_flush();
+			pr($ret);
 			$this->assertEquals($ret, $v[2]);
 		}
 	}
@@ -117,7 +117,7 @@ class TimeLibTest extends MyCakeTestCase {
 		foreach ($values as $v) {
 			$ret = TimeLib::periodAsSql($v[0], 'Model.field');
 			pr($v[1]);
-			pr($ret); ob_flush();
+			pr($ret);
 			$this->assertSame($v[1], $ret);
 
 		}

+ 1 - 4
Test/Case/Model/Behavior/BitmaskedBehaviorTest.php

@@ -38,7 +38,6 @@ class BitmaskedBehaviorTest extends MyCakeTestCase {
 		$this->assertTrue(!empty($res[1]['BitmaskedComment']['statuses']) && is_array($res[1]['BitmaskedComment']['statuses']));
 
 		debug($res[count($res)-1]);
-		ob_flush();
 	}
 
 	public function testSave() {
@@ -114,7 +113,7 @@ class BitmaskedBehaviorTest extends MyCakeTestCase {
 		$this->Comment->create();
 		$this->Comment->set($data);
 		$res = $this->Comment->validates();
-		debug($this->Comment->data); ob_flush();
+		debug($this->Comment->data);
 		$this->assertFalse($res);
 
 		$is = $this->Comment->data['BitmaskedComment']['status'];
@@ -171,8 +170,6 @@ class BitmaskedBehaviorTest extends MyCakeTestCase {
 		$conditions = $res;
 		$res = $this->Comment->find('all', array('conditions'=>$conditions));
 		$this->assertTrue(!empty($res) && count($res) === 5);
-
-		ob_flush();
 	}
 
 }

+ 4 - 4
Test/Case/Model/Behavior/DecimalInputBehaviorTest.php

@@ -98,7 +98,7 @@ class DecimalInputBehaviorTest extends MyCakeTestCase {
 		$this->assertTrue($res);
 
 		$res = $this->Model->data;
-		//debug($res); ob_flush();
+		//debug($res);
 		$this->assertSame($res[$this->Model->alias]['set_rate'], '0#1');
 		$this->assertSame($res[$this->Model->alias]['rel_rate'], -0.02);
 	}
@@ -158,7 +158,7 @@ class DecimalInputBehaviorTest extends MyCakeTestCase {
 		$this->assertTrue((bool)$res);
 
 		$res = $this->Model->find('first', array('conditions' => array('name' => 'english')));
-		//debug($res); ob_flush();
+		//debug($res);
 		$this->assertTrue(!empty($res));
 		$this->assertSame(substr($res[$this->Model->alias]['set_rate'], 0, 4), '3.21');
 		$this->assertSame(substr($res[$this->Model->alias]['rel_rate'], 0, 5), '-4.32');
@@ -178,7 +178,7 @@ class DecimalInputBehaviorTest extends MyCakeTestCase {
 		$this->assertTrue((bool)$res);
 
 		$res = $this->Model->find('first', array('conditions' => array('name' => 'multiply')));
-		//debug($res); ob_flush();
+		//debug($res);
 		$this->assertTrue(!empty($res));
 		$this->assertSame(substr($res[$this->Model->alias]['set_rate'], 0, 4), '1.22');
 		$this->assertSame(substr($res[$this->Model->alias]['rel_rate'], 0, 5), '-0.02');
@@ -187,7 +187,7 @@ class DecimalInputBehaviorTest extends MyCakeTestCase {
 		$this->Model->Behaviors->load('Tools.DecimalInput', array('fields'=>array('rel_rate', 'set_rate'), 'transform'=>array(), 'multiply'=>0.01, 'output'=>true));
 
 		$res = $this->Model->find('first', array('conditions' => array('name' => 'multiply')));
-		debug($res); ob_flush();
+		debug($res);
 		$this->assertTrue(!empty($res));
 		$this->assertSame($res[$this->Model->alias]['set_rate'], '122');
 		$this->assertSame($res[$this->Model->alias]['rel_rate'], '-2');

+ 1 - 1
Test/Case/Model/Behavior/KeyValueBehaviorTest.php

@@ -53,7 +53,7 @@ class KeyValueBehaviorTest extends MyCakeTestCase {
 
 		$res = $this->Model->getSection(2);
 		$this->assertTrue(!empty($res['Profile']));
-		//debug($res); ob_flush();
+		//debug($res);
 	}
 
 	public function testDefaults() {

+ 4 - 4
Test/Case/Model/Behavior/NumberFormatBehaviorTest.php

@@ -98,7 +98,7 @@ class NumberFormatBehaviorTest extends MyCakeTestCase {
 		$this->assertTrue($res);
 
 		$res = $this->Model->data;
-		//debug($res); ob_flush();
+		//debug($res);
 		$this->assertSame($res[$this->Model->alias]['set_rate'], '0#1');
 		$this->assertSame($res[$this->Model->alias]['rel_rate'], -0.02);
 	}
@@ -158,7 +158,7 @@ class NumberFormatBehaviorTest extends MyCakeTestCase {
 		$this->assertTrue((bool)$res);
 
 		$res = $this->Model->find('first', array('conditions' => array('name' => 'english')));
-		//debug($res); ob_flush();
+		//debug($res);
 		$this->assertTrue(!empty($res));
 		$this->assertSame(substr($res[$this->Model->alias]['set_rate'], 0, 4), '3.21');
 		$this->assertSame(substr($res[$this->Model->alias]['rel_rate'], 0, 5), '-4.32');
@@ -178,7 +178,7 @@ class NumberFormatBehaviorTest extends MyCakeTestCase {
 		$this->assertTrue((bool)$res);
 
 		$res = $this->Model->find('first', array('conditions' => array('name' => 'multiply')));
-		//debug($res); ob_flush();
+		//debug($res);
 		$this->assertTrue(!empty($res));
 		$this->assertSame(substr($res[$this->Model->alias]['set_rate'], 0, 4), '1.22');
 		$this->assertSame(substr($res[$this->Model->alias]['rel_rate'], 0, 5), '-0.02');
@@ -187,7 +187,7 @@ class NumberFormatBehaviorTest extends MyCakeTestCase {
 		$this->Model->Behaviors->load('Tools.NumberFormat', array('fields'=>array('rel_rate', 'set_rate'), 'transform'=>array(), 'multiply'=>0.01, 'output'=>true));
 
 		$res = $this->Model->find('first', array('conditions' => array('name' => 'multiply')));
-		//debug($res); ob_flush();
+		//debug($res);
 		$this->assertTrue(!empty($res));
 		$this->assertSame($res[$this->Model->alias]['set_rate'], '122');
 		$this->assertSame($res[$this->Model->alias]['rel_rate'], '-2');

+ 5 - 5
Test/Case/Model/Behavior/PasswordableBehaviorTest.php

@@ -60,7 +60,7 @@ class PasswordableBehaviorTest extends CakeTestCase {
 		);
 		$this->User->set($data);
 		$is = $this->User->save();
-		//debug($this->User->validationErrors); ob_flush();
+		//debug($this->User->validationErrors);
 		$this->assertFalse($is);
 		$this->assertEquals(array('pwd_repeat'), array_keys($this->User->validationErrors));
 
@@ -72,7 +72,7 @@ class PasswordableBehaviorTest extends CakeTestCase {
 		);
 		$this->User->set($data);
 		$is = $this->User->save();
-		//debug($this->User->validationErrors); ob_flush();
+		//debug($this->User->validationErrors);
 		$this->assertFalse($is);
 		$this->assertEquals(array(__('valErrPwdNotMatch')), $this->User->validationErrors['pwd_repeat']);
 
@@ -99,7 +99,7 @@ class PasswordableBehaviorTest extends CakeTestCase {
 		);
 		$this->User->set($data);
 		$is = $this->User->save();
-		debug($is); ob_flush();
+		debug($is);
 		$this->assertTrue(!empty($is));
 	}
 
@@ -115,7 +115,7 @@ class PasswordableBehaviorTest extends CakeTestCase {
 		);
 		$this->User->set($data);
 		$is = $this->User->save();
-		debug($this->User->validationErrors); ob_flush();
+		debug($this->User->validationErrors);
 		$this->assertFalse($is);
 		$this->assertEquals(array('pwd', 'pwd_repeat'), array_keys($this->User->validationErrors));
 	}
@@ -131,7 +131,7 @@ class PasswordableBehaviorTest extends CakeTestCase {
 		);
 		$this->User->set($data);
 		$is = $this->User->save();
-		//debug($this->User->validationErrors); ob_flush();
+		//debug($this->User->validationErrors);
 		$this->assertFalse($is);
 		$this->assertEquals(array('pwd', 'pwd_repeat', 'pwd_current'), array_keys($this->User->validationErrors));
 

+ 1 - 1
Test/Case/Model/Behavior/RevisionBehaviorTest.php

@@ -1228,7 +1228,7 @@ class RevisionBehaviorTest extends CakeTestCase {
 
 		$result = $Comment->ShadowModel->find('all', array('conditions' => array('version_id' => array(4, 5))));
 		//TODO: assert/fixme
-		//debug($result); ob_flush();
+		//debug($result);
 		//$this->assertEquals($result[0]['Comment']['Tag'], '3');
 		//$this->assertEquals($result[1]['Comment']['Tag'], '2,3');
 	}

+ 1 - 1
Test/Case/Model/Behavior/SluggedBehaviorTest.php

@@ -527,7 +527,7 @@ class SluggedBehaviorTest extends CakeTestCase {
 				$string .= "\x{{$code}}";
 			}
 		}
-		debug(array(basename($inputFile) => "\n\t" . $string)); ob_flush();
+		debug(array(basename($inputFile) => "\n\t" . $string));
 	}
 
 /**

+ 1 - 1
Test/Case/View/Helper/FormExtHelperTest.php

@@ -117,7 +117,7 @@ class FormExtHelperTest extends MyCakeTestCase {
 
 		$this->Form->request->data['Model']['field'] = "My\nvalue";
 		$result = $this->Form->input('Model.field', array('type' => 'textarea'));
-		//debug($result); ob_flush();
+		//debug($result);
 		$this->assertTags($result, array(
 			'div' => array('class' => 'input textarea'),
 			'label' => array('for' => 'ModelField'),

+ 4 - 4
Test/Case/View/Helper/FormatHelperTest.php

@@ -95,7 +95,7 @@ class FormatHelperTest extends MyCakeTestCase {
 		foreach ($values as $key => $value) {
 			$res = $this->Format->priorityIcon($value[0], $value[1]);
 			echo $key;
-			//debug($res, null, false); ob_flush();
+			//debug($res, null, false);
 			$this->assertEquals($value[2], $res);
 		}
 	}
@@ -132,11 +132,11 @@ class FormatHelperTest extends MyCakeTestCase {
 		foreach ($data as $value => $expected) {
 			$res = $this->Format->truncate($value, 30, array('html' => true));
 
-			debug( '\''.h($value).'\' becomes \''.$res.'\'', null, false); ob_flush();
+			debug( '\''.h($value).'\' becomes \''.$res.'\'', null, false);
 
 			$res = $this->Format->truncate($value, 30, array('html' => true));
 
-			debug( '\''.h($value).'\' becomes \''.$res.'\'', null, false); ob_flush();
+			debug( '\''.h($value).'\' becomes \''.$res.'\'', null, false);
 
 			//$this->assertTrue(!empty($res));
 			$this->assertEquals($expected, $res);
@@ -178,7 +178,7 @@ class FormatHelperTest extends MyCakeTestCase {
 		foreach ($data as $value => $expected) {
 			$res = $this->Format->wordCensor($value, array('Arsch', 'Ficken', 'Bitch'));
 
-			//debug('\''.h($value).'\' becomes \''.h($res).'\'', null, false); ob_flush();
+			//debug('\''.h($value).'\' becomes \''.h($res).'\'', null, false);
 			$this->assertEquals($expected === null ? $value : $expected, $res);
 		}
 

+ 1 - 2
Test/Case/View/Helper/IcalHelperTest.php

@@ -63,8 +63,7 @@ class IcalHelperTest extends MyCakeTestCase {
 		$this->Ical->add($data);
 		$this->Ical->add($data);
 		$res = $this->Ical->generate();
-		pr($res);
-		ob_flush();
+		//pr($res);
 	}
 
 }