Completed
Pull Request — master (#90)
by Reginaldo
18:50
created
lib/Cake/Test/Case/View/Helper/FormHelperTest.php 3 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 /**
311 311
  * beforeValidate method
312 312
  *
313
- * @return void
313
+ * @return boolean
314 314
  */
315 315
 	public function beforeValidate($options = array()) {
316 316
 		$this->invalidate('openid_not_registered');
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
 /**
360 360
  * beforeValidate method
361 361
  *
362
- * @return void
362
+ * @return boolean
363 363
  */
364 364
 	public function beforeValidate($options = array()) {
365 365
 		$this->invalidate('email');
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
 /**
418 418
  * beforeValidate method
419 419
  *
420
- * @return void
420
+ * @return boolean
421 421
  */
422 422
 	public function beforeValidate($options = array()) {
423 423
 		$this->invalidate('full_name');
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
 /**
468 468
  * beforeValidate method
469 469
  *
470
- * @return void
470
+ * @return boolean
471 471
  */
472 472
 	public function beforeValidate($options = array()) {
473 473
 		$this->invalidate('description');
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -690,8 +690,8 @@  discard block
 block discarded – undo
690 690
 		$this->Form->request['_Token'] = array('key' => $key);
691 691
 		$result = $this->Form->secure($fields);
692 692
 
693
-		$hash = Security::hash(serialize($fields) . Configure::read('Security.salt'));
694
-		$hash .= ':' . 'Model.valid';
693
+		$hash = Security::hash(serialize($fields).Configure::read('Security.salt'));
694
+		$hash .= ':'.'Model.valid';
695 695
 		$hash = urlencode($hash);
696 696
 
697 697
 		$expected = array(
@@ -708,7 +708,7 @@  discard block
 block discarded – undo
708 708
 		);
709 709
 		$this->assertTags($result, $expected);
710 710
 
711
-		$path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS;
711
+		$path = CAKE.'Test'.DS.'test_app'.DS.'Config'.DS;
712 712
 		$this->Form->Html->loadConfig('htmlhelper_tags', $path);
713 713
 		$result = $this->Form->secure($fields);
714 714
 		$expected = array(
@@ -2286,7 +2286,7 @@  discard block
 block discarded – undo
2286 2286
 
2287 2287
 		$result = $this->Form->input('published', array('type' => 'time'));
2288 2288
 		$now = strtotime('now');
2289
-		$this->assertContains('<option value="' . date('h', $now) . '" selected="selected">' . date('g', $now) . '</option>', $result);
2289
+		$this->assertContains('<option value="'.date('h', $now).'" selected="selected">'.date('g', $now).'</option>', $result);
2290 2290
 
2291 2291
 		$now = strtotime('2013-03-09 00:42:21');
2292 2292
 		$result = $this->Form->input('published', array('type' => 'time', 'selected' => $now));
@@ -3236,7 +3236,7 @@  discard block
 block discarded – undo
3236 3236
 	public function testInputsPluginModel() {
3237 3237
 		$this->loadFixtures('Post');
3238 3238
 		App::build(array(
3239
-			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
3239
+			'Plugin' => array(CAKE.'Test'.DS.'test_app'.DS.'Plugin'.DS)
3240 3240
 		));
3241 3241
 		CakePlugin::load('TestPlugin');
3242 3242
 		$this->Form->request['models'] = array(
@@ -5387,7 +5387,7 @@  discard block
 block discarded – undo
5387 5387
 
5388 5388
 		$result = $this->Form->secure($this->Form->fields);
5389 5389
 		$key = 'f7d573650a295b94e0938d32b323fde775e5f32b%3A';
5390
-		$this->assertRegExp('/"' . $key . '"/', $result);
5390
+		$this->assertRegExp('/"'.$key.'"/', $result);
5391 5391
 	}
5392 5392
 
5393 5393
 /**
@@ -6109,7 +6109,7 @@  discard block
 block discarded – undo
6109 6109
 		$this->assertTags($result, $expected);
6110 6110
 		$this->assertNotRegExp('/<option[^<>]+value=""[^<>]+selected="selected"[^>]*>/', $result);
6111 6111
 
6112
-		$this->Form->request->data['Model']['field'] = date('Y') . '-01-01 00:00:00';
6112
+		$this->Form->request->data['Model']['field'] = date('Y').'-01-01 00:00:00';
6113 6113
 		$now = strtotime($this->Form->data['Model']['field']);
6114 6114
 		$result = $this->Form->dateTime('Model.field', 'DMY', '12', array('empty' => false));
6115 6115
 		$expected = array(
@@ -6929,7 +6929,7 @@  discard block
 block discarded – undo
6929 6929
 		$result = $this->Form->hour('Model.field', true, array('value' => 'now'));
6930 6930
 		$thisHour = date('H');
6931 6931
 		$optValue = date('G');
6932
-		$this->assertRegExp('/<option value="' . $thisHour . '" selected="selected">' . $optValue . '<\/option>/', $result);
6932
+		$this->assertRegExp('/<option value="'.$thisHour.'" selected="selected">'.$optValue.'<\/option>/', $result);
6933 6933
 
6934 6934
 		$this->Form->request->data['Model']['field'] = '2050-10-10 01:12:32';
6935 6935
 		$result = $this->Form->hour('Model.field', true);
@@ -7227,7 +7227,7 @@  discard block
 block discarded – undo
7227 7227
 					'maxYear' => 2008
7228 7228
 				)
7229 7229
 		);
7230
-		$this->assertContains('value="' . date('m') . '" selected="selected"', $result);
7230
+		$this->assertContains('value="'.date('m').'" selected="selected"', $result);
7231 7231
 		$this->assertNotContains('value="2008" selected="selected"', $result);
7232 7232
 
7233 7233
 		$result = $this->Form->input('just_year',
@@ -7239,7 +7239,7 @@  discard block
 block discarded – undo
7239 7239
 				'maxYear' => date('Y', strtotime('+20 years'))
7240 7240
 			)
7241 7241
 		);
7242
-		$this->assertNotContains('value="' . date('Y') . '" selected="selected"', $result);
7242
+		$this->assertNotContains('value="'.date('Y').'" selected="selected"', $result);
7243 7243
 
7244 7244
 		$result = $this->Form->input('just_month',
7245 7245
 			array(
@@ -7249,7 +7249,7 @@  discard block
 block discarded – undo
7249 7249
 				'empty' => false,
7250 7250
 			)
7251 7251
 		);
7252
-		$this->assertNotContains('value="' . date('m') . '" selected="selected"', $result);
7252
+		$this->assertNotContains('value="'.date('m').'" selected="selected"', $result);
7253 7253
 
7254 7254
 		$result = $this->Form->input('just_day',
7255 7255
 			array(
@@ -7259,7 +7259,7 @@  discard block
 block discarded – undo
7259 7259
 				'empty' => false,
7260 7260
 			)
7261 7261
 		);
7262
-		$this->assertNotContains('value="' . date('d') . '" selected="selected"', $result);
7262
+		$this->assertNotContains('value="'.date('d').'" selected="selected"', $result);
7263 7263
 	}
7264 7264
 
7265 7265
 /**
@@ -7623,9 +7623,9 @@  discard block
 block discarded – undo
7623 7623
  */
7624 7624
 	public function testPostLinkSecurityHash() {
7625 7625
 		$hash = Security::hash(
7626
-			'/posts/delete/1' .
7627
-			serialize(array()) .
7628
-			'' .
7626
+			'/posts/delete/1'.
7627
+			serialize(array()).
7628
+			''.
7629 7629
 			Configure::read('Security.salt')
7630 7630
 		);
7631 7631
 		$hash .= '%3A';
@@ -9636,7 +9636,7 @@  discard block
 block discarded – undo
9636 9636
 	public function testIntrospectModelFromRequest() {
9637 9637
 		$this->loadFixtures('Post');
9638 9638
 		App::build(array(
9639
-			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
9639
+			'Plugin' => array(CAKE.'Test'.DS.'test_app'.DS.'Plugin'.DS)
9640 9640
 		));
9641 9641
 		CakePlugin::load('TestPlugin');
9642 9642
 		$this->Form->request['models'] = array('TestPluginPost' => array('plugin' => 'TestPlugin', 'className' => 'TestPluginPost'));
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5408,11 +5408,11 @@
 block discarded – undo
5408 5408
 		$this->assertEquals(array('Model.select'), $this->Form->fields);
5409 5409
 	}
5410 5410
 /**
5411
- * When a select box has no options it should not be added to the fields list
5412
- * as it always fail post validation.
5413
- *
5414
- * @return void
5415
- */
5411
+	 * When a select box has no options it should not be added to the fields list
5412
+	 * as it always fail post validation.
5413
+	 *
5414
+	 * @return void
5415
+	 */
5416 5416
 	public function testSelectNoSecureWithNoOptions() {
5417 5417
 		$this->Form->request['_Token'] = array('key' => 'testkey');
5418 5418
 		$this->assertEquals(array(), $this->Form->fields);
Please login to merge, or discard this patch.
lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
  * @param string $exclude
60 60
  * @param string $insertBefore
61 61
  * @param string $insertAfter
62
- * @return void
62
+ * @return string
63 63
  */
64 64
 	public function parseAttributes($options, $exclude = null, $insertBefore = ' ', $insertAfter = null) {
65 65
 		return $this->_parseAttributes($options, $exclude, $insertBefore, $insertAfter);
Please login to merge, or discard this patch.
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 App::uses('ClassRegistry', 'Utility');
25 25
 App::uses('Folder', 'Utility');
26 26
 
27
-if (!defined('FULL_BASE_URL')) {
27
+if ( ! defined('FULL_BASE_URL')) {
28 28
 	define('FULL_BASE_URL', 'http://cakephp.org');
29 29
 }
30 30
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
  * @return mixed
73 73
  */
74 74
 	public function getAttribute($attribute) {
75
-		if (!isset($this->{$attribute})) {
75
+		if ( ! isset($this->{$attribute})) {
76 76
 			return null;
77 77
 		}
78 78
 		return $this->{$attribute};
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 		$this->Html->request->webroot = '';
151 151
 
152 152
 		App::build(array(
153
-			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
153
+			'Plugin' => array(CAKE.'Test'.DS.'test_app'.DS.'Plugin'.DS)
154 154
 		));
155 155
 
156 156
 		Configure::write('Asset.timestamp', false);
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 		Router::reload();
209 209
 
210 210
 		$result = $this->Html->link('Posts', array('controller' => 'posts', 'action' => 'index', 'full_base' => true));
211
-		$expected = array('a' => array('href' => Router::fullBaseUrl() . '/posts'), 'Posts', '/a');
211
+		$expected = array('a' => array('href' => Router::fullBaseUrl().'/posts'), 'Posts', '/a');
212 212
 		$this->assertTags($result, $expected);
213 213
 
214 214
 		$result = $this->Html->link('Home', '/home', array('confirm' => 'Are you sure you want to do this?'));
@@ -464,11 +464,11 @@  discard block
 block discarded – undo
464 464
 	public function testImageWithFullBase() {
465 465
 		$result = $this->Html->image('test.gif', array('fullBase' => true));
466 466
 		$here = $this->Html->url('/', true);
467
-		$this->assertTags($result, array('img' => array('src' => $here . 'img/test.gif', 'alt' => '')));
467
+		$this->assertTags($result, array('img' => array('src' => $here.'img/test.gif', 'alt' => '')));
468 468
 
469 469
 		$result = $this->Html->image('sub/test.gif', array('fullBase' => true));
470 470
 		$here = $this->Html->url('/', true);
471
-		$this->assertTags($result, array('img' => array('src' => $here . 'img/sub/test.gif', 'alt' => '')));
471
+		$this->assertTags($result, array('img' => array('src' => $here.'img/sub/test.gif', 'alt' => '')));
472 472
 
473 473
 		$request = $this->Html->request;
474 474
 		$request->webroot = '/myproject/';
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
 
478 478
 		$result = $this->Html->image('sub/test.gif', array('fullBase' => true));
479 479
 		$here = $this->Html->url('/', true);
480
-		$this->assertTags($result, array('img' => array('src' => $here . 'img/sub/test.gif', 'alt' => '')));
480
+		$this->assertTags($result, array('img' => array('src' => $here.'img/sub/test.gif', 'alt' => '')));
481 481
 	}
482 482
 
483 483
 /**
@@ -512,16 +512,16 @@  discard block
 block discarded – undo
512 512
  * @return void
513 513
  */
514 514
 	public function testImageTagWithTheme() {
515
-		$this->skipIf(!is_writable(WWW_ROOT), 'Cannot write to webroot.');
516
-		$themeExists = is_dir(WWW_ROOT . 'theme');
515
+		$this->skipIf( ! is_writable(WWW_ROOT), 'Cannot write to webroot.');
516
+		$themeExists = is_dir(WWW_ROOT.'theme');
517 517
 
518 518
 		App::uses('File', 'Utility');
519 519
 
520
-		$testfile = WWW_ROOT . 'theme' . DS . 'test_theme' . DS . 'img' . DS . '__cake_test_image.gif';
520
+		$testfile = WWW_ROOT.'theme'.DS.'test_theme'.DS.'img'.DS.'__cake_test_image.gif';
521 521
 		new File($testfile, true);
522 522
 
523 523
 		App::build(array(
524
-			'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS)
524
+			'View' => array(CAKE.'Test'.DS.'test_app'.DS.'View'.DS)
525 525
 		));
526 526
 		Configure::write('Asset.timestamp', true);
527 527
 		Configure::write('debug', 1);
@@ -544,10 +544,10 @@  discard block
 block discarded – undo
544 544
 				'alt' => ''
545 545
 		)));
546 546
 
547
-		$dir = new Folder(WWW_ROOT . 'theme' . DS . 'test_theme');
547
+		$dir = new Folder(WWW_ROOT.'theme'.DS.'test_theme');
548 548
 		$dir->delete();
549
-		if (!$themeExists) {
550
-			$dir = new Folder(WWW_ROOT . 'theme');
549
+		if ( ! $themeExists) {
550
+			$dir = new Folder(WWW_ROOT.'theme');
551 551
 			$dir->delete();
552 552
 		}
553 553
 	}
@@ -559,10 +559,10 @@  discard block
 block discarded – undo
559 559
  */
560 560
 	public function testThemeAssetsInMainWebrootPath() {
561 561
 		App::build(array(
562
-			'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS)
562
+			'View' => array(CAKE.'Test'.DS.'test_app'.DS.'View'.DS)
563 563
 		));
564 564
 		$webRoot = Configure::read('App.www_root');
565
-		Configure::write('App.www_root', CAKE . 'Test' . DS . 'test_app' . DS . 'webroot' . DS);
565
+		Configure::write('App.www_root', CAKE.'Test'.DS.'test_app'.DS.'webroot'.DS);
566 566
 
567 567
 		$this->Html->theme = 'test_theme';
568 568
 		$result = $this->Html->css('webroot_test');
@@ -741,7 +741,7 @@  discard block
 block discarded – undo
741 741
 
742 742
 		$result = $this->Html->css('screen', null, array('fullBase' => true));
743 743
 		$expected = array(
744
-			'link' => array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => $here . 'css/screen.css')
744
+			'link' => array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => $here.'css/screen.css')
745 745
 		);
746 746
 		$this->assertTags($result, $expected);
747 747
 	}
@@ -879,22 +879,22 @@  discard block
 block discarded – undo
879 879
  * @return void
880 880
  */
881 881
 	public function testScriptTimestamping() {
882
-		$this->skipIf(!is_writable(WWW_ROOT . 'js'), 'webroot/js is not Writable, timestamp testing has been skipped.');
882
+		$this->skipIf( ! is_writable(WWW_ROOT.'js'), 'webroot/js is not Writable, timestamp testing has been skipped.');
883 883
 
884 884
 		Configure::write('debug', 2);
885 885
 		Configure::write('Asset.timestamp', true);
886 886
 
887
-		touch(WWW_ROOT . 'js' . DS . '__cake_js_test.js');
887
+		touch(WWW_ROOT.'js'.DS.'__cake_js_test.js');
888 888
 		$timestamp = substr(strtotime('now'), 0, 8);
889 889
 
890 890
 		$result = $this->Html->script('__cake_js_test', array('inline' => true, 'once' => false));
891
-		$this->assertRegExp('/__cake_js_test.js\?' . $timestamp . '[0-9]{2}"/', $result, 'Timestamp value not found %s');
891
+		$this->assertRegExp('/__cake_js_test.js\?'.$timestamp.'[0-9]{2}"/', $result, 'Timestamp value not found %s');
892 892
 
893 893
 		Configure::write('debug', 0);
894 894
 		Configure::write('Asset.timestamp', 'force');
895 895
 		$result = $this->Html->script('__cake_js_test', array('inline' => true, 'once' => false));
896
-		$this->assertRegExp('/__cake_js_test.js\?' . $timestamp . '[0-9]{2}"/', $result, 'Timestamp value not found %s');
897
-		unlink(WWW_ROOT . 'js' . DS . '__cake_js_test.js');
896
+		$this->assertRegExp('/__cake_js_test.js\?'.$timestamp.'[0-9]{2}"/', $result, 'Timestamp value not found %s');
897
+		unlink(WWW_ROOT.'js'.DS.'__cake_js_test.js');
898 898
 		Configure::write('Asset.timestamp', false);
899 899
 	}
900 900
 
@@ -907,23 +907,23 @@  discard block
 block discarded – undo
907 907
 		CakePlugin::load('TestPlugin');
908 908
 
909 909
 		$pluginPath = App::pluginPath('TestPlugin');
910
-		$pluginJsPath = $pluginPath . 'webroot/js';
911
-		$this->skipIf(!is_writable($pluginJsPath), $pluginJsPath . ' is not Writable, timestamp testing has been skipped.');
910
+		$pluginJsPath = $pluginPath.'webroot/js';
911
+		$this->skipIf( ! is_writable($pluginJsPath), $pluginJsPath.' is not Writable, timestamp testing has been skipped.');
912 912
 
913 913
 		Configure::write('debug', 2);
914 914
 		Configure::write('Asset.timestamp', true);
915 915
 
916
-		touch($pluginJsPath . DS . '__cake_js_test.js');
916
+		touch($pluginJsPath.DS.'__cake_js_test.js');
917 917
 		$timestamp = substr(strtotime('now'), 0, 8);
918 918
 
919 919
 		$result = $this->Html->script('TestPlugin.__cake_js_test', array('inline' => true, 'once' => false));
920
-		$this->assertRegExp('/test_plugin\/js\/__cake_js_test.js\?' . $timestamp . '[0-9]{2}"/', $result, 'Timestamp value not found %s');
920
+		$this->assertRegExp('/test_plugin\/js\/__cake_js_test.js\?'.$timestamp.'[0-9]{2}"/', $result, 'Timestamp value not found %s');
921 921
 
922 922
 		Configure::write('debug', 0);
923 923
 		Configure::write('Asset.timestamp', 'force');
924 924
 		$result = $this->Html->script('TestPlugin.__cake_js_test', array('inline' => true, 'once' => false));
925
-		$this->assertRegExp('/test_plugin\/js\/__cake_js_test.js\?' . $timestamp . '[0-9]{2}"/', $result, 'Timestamp value not found %s');
926
-		unlink($pluginJsPath . DS . '__cake_js_test.js');
925
+		$this->assertRegExp('/test_plugin\/js\/__cake_js_test.js\?'.$timestamp.'[0-9]{2}"/', $result, 'Timestamp value not found %s');
926
+		unlink($pluginJsPath.DS.'__cake_js_test.js');
927 927
 		Configure::write('Asset.timestamp', false);
928 928
 
929 929
 		CakePlugin::unload('TestPlugin');
@@ -1149,15 +1149,15 @@  discard block
 block discarded – undo
1149 1149
 
1150 1150
 		$result = $this->Html->script('foo', array('fullBase' => true));
1151 1151
 		$expected = array(
1152
-			'script' => array('type' => 'text/javascript', 'src' => $here . 'js/foo.js')
1152
+			'script' => array('type' => 'text/javascript', 'src' => $here.'js/foo.js')
1153 1153
 		);
1154 1154
 		$this->assertTags($result, $expected);
1155 1155
 
1156 1156
 		$result = $this->Html->script(array('foobar', 'bar'), array('fullBase' => true));
1157 1157
 		$expected = array(
1158
-			array('script' => array('type' => 'text/javascript', 'src' => $here . 'js/foobar.js')),
1158
+			array('script' => array('type' => 'text/javascript', 'src' => $here.'js/foobar.js')),
1159 1159
 			'/script',
1160
-			array('script' => array('type' => 'text/javascript', 'src' => $here . 'js/bar.js')),
1160
+			array('script' => array('type' => 'text/javascript', 'src' => $here.'js/bar.js')),
1161 1161
 			'/script',
1162 1162
 		);
1163 1163
 		$this->assertTags($result, $expected);
@@ -1169,16 +1169,16 @@  discard block
 block discarded – undo
1169 1169
  * @return void
1170 1170
  */
1171 1171
 	public function testScriptInTheme() {
1172
-		$this->skipIf(!is_writable(WWW_ROOT), 'Cannot write to webroot.');
1173
-		$themeExists = is_dir(WWW_ROOT . 'theme');
1172
+		$this->skipIf( ! is_writable(WWW_ROOT), 'Cannot write to webroot.');
1173
+		$themeExists = is_dir(WWW_ROOT.'theme');
1174 1174
 
1175 1175
 		App::uses('File', 'Utility');
1176 1176
 
1177
-		$testfile = WWW_ROOT . 'theme' . DS . 'test_theme' . DS . 'js' . DS . '__test_js.js';
1177
+		$testfile = WWW_ROOT.'theme'.DS.'test_theme'.DS.'js'.DS.'__test_js.js';
1178 1178
 		new File($testfile, true);
1179 1179
 
1180 1180
 		App::build(array(
1181
-			'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS)
1181
+			'View' => array(CAKE.'Test'.DS.'test_app'.DS.'View'.DS)
1182 1182
 		));
1183 1183
 
1184 1184
 		$this->Html->webroot = '/';
@@ -1189,11 +1189,11 @@  discard block
 block discarded – undo
1189 1189
 		);
1190 1190
 		$this->assertTags($result, $expected);
1191 1191
 
1192
-		$Folder = new Folder(WWW_ROOT . 'theme' . DS . 'test_theme');
1192
+		$Folder = new Folder(WWW_ROOT.'theme'.DS.'test_theme');
1193 1193
 		$Folder->delete();
1194 1194
 
1195
-		if (!$themeExists) {
1196
-			$dir = new Folder(WWW_ROOT . 'theme');
1195
+		if ( ! $themeExists) {
1196
+			$dir = new Folder(WWW_ROOT.'theme');
1197 1197
 			$dir->delete();
1198 1198
 		}
1199 1199
 	}
@@ -1994,7 +1994,7 @@  discard block
 block discarded – undo
1994 1994
 			array('pathPrefix' => 'videos/', 'poster' => 'poster.jpg', 'text' => 'Your browser does not support the HTML5 Video element.')
1995 1995
 		);
1996 1996
 		$expected = array(
1997
-			'video' => array('poster' => Configure::read('App.imageBaseUrl') . 'poster.jpg'),
1997
+			'video' => array('poster' => Configure::read('App.imageBaseUrl').'poster.jpg'),
1998 1998
 				array('source' => array('src' => 'videos/video.webm', 'type' => 'video/webm')),
1999 1999
 				array('source' => array('src' => 'videos/video.ogv', 'type' => 'video/ogg; codecs=&#039;theora, vorbis&#039;')),
2000 2000
 				'Your browser does not support the HTML5 Video element.',
@@ -2181,7 +2181,7 @@  discard block
 block discarded – undo
2181 2181
  */
2182 2182
 
2183 2183
 	public function testLoadConfig() {
2184
-		$path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS;
2184
+		$path = CAKE.'Test'.DS.'test_app'.DS.'Config'.DS;
2185 2185
 
2186 2186
 		$result = $this->Html->loadConfig('htmlhelper_tags', $path);
2187 2187
 		$expected = array(
@@ -2222,7 +2222,7 @@  discard block
 block discarded – undo
2222 2222
  * @expectedException ConfigureException
2223 2223
  */
2224 2224
 	public function testLoadConfigWrongReader() {
2225
-		$path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS;
2225
+		$path = CAKE.'Test'.DS.'test_app'.DS.'Config'.DS;
2226 2226
 		$this->Html->loadConfig(array('htmlhelper_tags', 'wrong_reader'), $path);
2227 2227
 	}
2228 2228
 
@@ -2239,8 +2239,8 @@  discard block
 block discarded – undo
2239 2239
 		foreach ($compact as $attribute) {
2240 2240
 			foreach (array('true', true, 1, '1', $attribute) as $value) {
2241 2241
 				$attrs = array($attribute => $value);
2242
-				$expected = ' ' . $attribute . '="' . $attribute . '"';
2243
-				$this->assertEquals($expected, $helper->parseAttributes($attrs), '%s Failed on ' . $value);
2242
+				$expected = ' '.$attribute.'="'.$attribute.'"';
2243
+				$this->assertEquals($expected, $helper->parseAttributes($attrs), '%s Failed on '.$value);
2244 2244
 			}
2245 2245
 		}
2246 2246
 		$this->assertEquals(' compact="compact"', $helper->parseAttributes(array('compact')));
Please login to merge, or discard this patch.
lib/Cake/Test/Case/View/Helper/JsHelperTest.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,8 +69,8 @@
 block discarded – undo
69 69
  * test method for option parsing
70 70
  *
71 71
  * @param $options
72
- * @param array $safe
73
- * @return void
72
+ * @param string[] $safe
73
+ * @return string
74 74
  */
75 75
 	public function testParseOptions($options, $safe = array()) {
76 76
 		return $this->_parseOptions($options, $safe);
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
  * @return void
361 361
  */
362 362
 	public function testWriteScriptsInFile() {
363
-		$this->skipIf(!is_writable(WWW_ROOT . 'js'), 'webroot/js is not Writable, script caching test has been skipped.');
363
+		$this->skipIf( ! is_writable(WWW_ROOT.'js'), 'webroot/js is not Writable, script caching test has been skipped.');
364 364
 
365 365
 		Configure::write('Cache.disable', false);
366 366
 		$this->Js->request->webroot = '/';
@@ -373,11 +373,11 @@  discard block
 block discarded – undo
373 373
 		);
374 374
 		$this->assertTags($result, $expected);
375 375
 		preg_match('/src="(.*\.js)"/', $result, $filename);
376
-		$this->assertTrue(file_exists(WWW_ROOT . $filename[1]));
377
-		$contents = file_get_contents(WWW_ROOT . $filename[1]);
376
+		$this->assertTrue(file_exists(WWW_ROOT.$filename[1]));
377
+		$contents = file_get_contents(WWW_ROOT.$filename[1]);
378 378
 		$this->assertRegExp('/one\s=\s1;\ntwo\s=\s2;/', $contents);
379
-		if (file_exists(WWW_ROOT . $filename[1])) {
380
-			unlink(WWW_ROOT . $filename[1]);
379
+		if (file_exists(WWW_ROOT.$filename[1])) {
380
+			unlink(WWW_ROOT.$filename[1]);
381 381
 		}
382 382
 
383 383
 		Configure::write('Cache.disable', true);
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 		$this->Js->buffer('two = 2;');
386 386
 		$result = $this->Js->writeBuffer(array('onDomReady' => false, 'cache' => true));
387 387
 		$this->assertRegExp('/one\s=\s1;\ntwo\s=\s2;/', $result);
388
-		$this->assertFalse(file_exists(WWW_ROOT . $filename[1]));
388
+		$this->assertFalse(file_exists(WWW_ROOT.$filename[1]));
389 389
 	}
390 390
 
391 391
 /**
@@ -776,11 +776,11 @@  discard block
 block discarded – undo
776 776
 		$expected = '';
777 777
 		$this->assertEquals($expected, $result);
778 778
 
779
-		$result = $this->JsEngine->escape('CakePHP' . "\n" . 'Rapid Development Framework');
779
+		$result = $this->JsEngine->escape('CakePHP'."\n".'Rapid Development Framework');
780 780
 		$expected = 'CakePHP\\nRapid Development Framework';
781 781
 		$this->assertEquals($expected, $result);
782 782
 
783
-		$result = $this->JsEngine->escape('CakePHP' . "\r\n" . 'Rapid Development Framework' . "\r" . 'For PHP');
783
+		$result = $this->JsEngine->escape('CakePHP'."\r\n".'Rapid Development Framework'."\r".'For PHP');
784 784
 		$expected = 'CakePHP\\r\\nRapid Development Framework\\rFor PHP';
785 785
 		$this->assertEquals($expected, $result);
786 786
 
Please login to merge, or discard this patch.
lib/Cake/Test/Case/View/ScaffoldViewTest.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
  * testGetFilename method
35 35
  *
36 36
  * @param string $action
37
- * @return void
37
+ * @return string
38 38
  */
39 39
 	public function testGetFilename($action) {
40 40
 		return $this->_getViewFileName($action);
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 App::uses('ScaffoldView', 'View');
22 22
 App::uses('AppModel', 'Model');
23 23
 
24
-require_once dirname(dirname(__FILE__)) . DS . 'Model' . DS . 'models.php';
24
+require_once dirname(dirname(__FILE__)).DS.'Model'.DS.'models.php';
25 25
 
26 26
 /**
27 27
  * TestScaffoldView class
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
 		$this->Controller->response = $this->getMock('CakeResponse', array('_sendHeader'));
91 91
 
92 92
 		App::build(array(
93
-			'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
94
-			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
93
+			'View' => array(CAKE.'Test'.DS.'test_app'.DS.'View'.DS),
94
+			'Plugin' => array(CAKE.'Test'.DS.'test_app'.DS.'Plugin'.DS)
95 95
 		));
96 96
 		CakePlugin::load('TestPlugin');
97 97
 	}
@@ -118,39 +118,39 @@  discard block
 block discarded – undo
118 118
 		$this->Controller->request->params['action'] = 'index';
119 119
 		$ScaffoldView = new TestScaffoldView($this->Controller);
120 120
 		$result = $ScaffoldView->testGetFilename('index');
121
-		$expected = CAKE . 'View' . DS . 'Scaffolds' . DS . 'index.ctp';
121
+		$expected = CAKE.'View'.DS.'Scaffolds'.DS.'index.ctp';
122 122
 		$this->assertEquals($expected, $result);
123 123
 
124 124
 		$result = $ScaffoldView->testGetFilename('edit');
125
-		$expected = CAKE . 'View' . DS . 'Scaffolds' . DS . 'form.ctp';
125
+		$expected = CAKE.'View'.DS.'Scaffolds'.DS.'form.ctp';
126 126
 		$this->assertEquals($expected, $result);
127 127
 
128 128
 		$result = $ScaffoldView->testGetFilename('add');
129
-		$expected = CAKE . 'View' . DS . 'Scaffolds' . DS . 'form.ctp';
129
+		$expected = CAKE.'View'.DS.'Scaffolds'.DS.'form.ctp';
130 130
 		$this->assertEquals($expected, $result);
131 131
 
132 132
 		$result = $ScaffoldView->testGetFilename('view');
133
-		$expected = CAKE . 'View' . DS . 'Scaffolds' . DS . 'view.ctp';
133
+		$expected = CAKE.'View'.DS.'Scaffolds'.DS.'view.ctp';
134 134
 		$this->assertEquals($expected, $result);
135 135
 
136 136
 		$result = $ScaffoldView->testGetFilename('admin_index');
137
-		$expected = CAKE . 'View' . DS . 'Scaffolds' . DS . 'index.ctp';
137
+		$expected = CAKE.'View'.DS.'Scaffolds'.DS.'index.ctp';
138 138
 		$this->assertEquals($expected, $result);
139 139
 
140 140
 		$result = $ScaffoldView->testGetFilename('admin_view');
141
-		$expected = CAKE . 'View' . DS . 'Scaffolds' . DS . 'view.ctp';
141
+		$expected = CAKE.'View'.DS.'Scaffolds'.DS.'view.ctp';
142 142
 		$this->assertEquals($expected, $result);
143 143
 
144 144
 		$result = $ScaffoldView->testGetFilename('admin_edit');
145
-		$expected = CAKE . 'View' . DS . 'Scaffolds' . DS . 'form.ctp';
145
+		$expected = CAKE.'View'.DS.'Scaffolds'.DS.'form.ctp';
146 146
 		$this->assertEquals($expected, $result);
147 147
 
148 148
 		$result = $ScaffoldView->testGetFilename('admin_add');
149
-		$expected = CAKE . 'View' . DS . 'Scaffolds' . DS . 'form.ctp';
149
+		$expected = CAKE.'View'.DS.'Scaffolds'.DS.'form.ctp';
150 150
 		$this->assertEquals($expected, $result);
151 151
 
152 152
 		$result = $ScaffoldView->testGetFilename('error');
153
-		$expected = CAKE . 'View' . DS . 'Errors' . DS . 'scaffold_error.ctp';
153
+		$expected = CAKE.'View'.DS.'Errors'.DS.'scaffold_error.ctp';
154 154
 		$this->assertEquals($expected, $result);
155 155
 
156 156
 		$Controller = new ScaffoldViewMockController($this->request);
@@ -160,11 +160,11 @@  discard block
 block discarded – undo
160 160
 
161 161
 		$ScaffoldView = new TestScaffoldView($Controller);
162 162
 		$result = $ScaffoldView->testGetFilename('admin_edit');
163
-		$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Posts' . DS . 'scaffold.form.ctp';
163
+		$expected = CAKE.'Test'.DS.'test_app'.DS.'View'.DS.'Posts'.DS.'scaffold.form.ctp';
164 164
 		$this->assertEquals($expected, $result);
165 165
 
166 166
 		$result = $ScaffoldView->testGetFilename('edit');
167
-		$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Posts' . DS . 'scaffold.form.ctp';
167
+		$expected = CAKE.'Test'.DS.'test_app'.DS.'View'.DS.'Posts'.DS.'scaffold.form.ctp';
168 168
 		$this->assertEquals($expected, $result);
169 169
 
170 170
 		$Controller = new ScaffoldViewMockController($this->request);
@@ -179,13 +179,13 @@  discard block
 block discarded – undo
179 179
 
180 180
 		$ScaffoldView = new TestScaffoldView($Controller);
181 181
 		$result = $ScaffoldView->testGetFilename('admin_add');
182
-		$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' .
183
-			DS . 'TestPlugin' . DS . 'View' . DS . 'Tests' . DS . 'scaffold.form.ctp';
182
+		$expected = CAKE.'Test'.DS.'test_app'.DS.'Plugin'.
183
+			DS.'TestPlugin'.DS.'View'.DS.'Tests'.DS.'scaffold.form.ctp';
184 184
 		$this->assertEquals($expected, $result);
185 185
 
186 186
 		$result = $ScaffoldView->testGetFilename('add');
187
-		$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' .
188
-			DS . 'TestPlugin' . DS . 'View' . DS . 'Tests' . DS . 'scaffold.form.ctp';
187
+		$expected = CAKE.'Test'.DS.'test_app'.DS.'Plugin'.
188
+			DS.'TestPlugin'.DS.'View'.DS.'Tests'.DS.'scaffold.form.ctp';
189 189
 		$this->assertEquals($expected, $result);
190 190
 
191 191
 		Configure::write('Routing.prefixes', $_admin);
@@ -203,8 +203,8 @@  discard block
 block discarded – undo
203 203
 		$ScaffoldView = new TestScaffoldView($this->Controller);
204 204
 
205 205
 		$result = $ScaffoldView->testGetFilename('index');
206
-		$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS .
207
-			'Themed' . DS . 'TestTheme' . DS . 'Posts' . DS . 'scaffold.index.ctp';
206
+		$expected = CAKE.'Test'.DS.'test_app'.DS.'View'.DS.
207
+			'Themed'.DS.'TestTheme'.DS.'Posts'.DS.'scaffold.index.ctp';
208 208
 		$this->assertEquals($expected, $result);
209 209
 	}
210 210
 
Please login to merge, or discard this patch.
lib/Cake/Test/Case/View/ThemeViewTest.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
  *
64 64
  * @param string $name
65 65
  * @param array $params
66
- * @return void
66
+ * @return string
67 67
  */
68 68
 	public function renderElement($name, $params = array()) {
69 69
 		return $name;
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
  * getViewFileName method
74 74
  *
75 75
  * @param string $name
76
- * @return void
76
+ * @return string
77 77
  */
78 78
 	public function getViewFileName($name = null) {
79 79
 		return $this->_getViewFileName($name);
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
  * getLayoutFileName method
84 84
  *
85 85
  * @param string $name
86
- * @return void
86
+ * @return string
87 87
  */
88 88
 	public function getLayoutFileName($name = null) {
89 89
 		return $this->_getLayoutFileName($name);
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
 		$this->PostsController->index();
113 113
 		$this->ThemeView = new ThemeView($this->PostsController);
114 114
 		App::build(array(
115
-			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
116
-			'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS)
115
+			'Plugin' => array(CAKE.'Test'.DS.'test_app'.DS.'Plugin'.DS),
116
+			'View' => array(CAKE.'Test'.DS.'test_app'.DS.'View'.DS)
117 117
 		));
118 118
 		App::objects('plugins', null, false);
119 119
 		CakePlugin::load(array('TestPlugin'));
@@ -145,15 +145,15 @@  discard block
 block discarded – undo
145 145
 		$this->Controller->theme = 'TestTheme';
146 146
 
147 147
 		$ThemeView = new TestTheme2View($this->Controller);
148
-		$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Plugin' . DS . 'TestPlugin' . DS . 'Tests' . DS . 'index.ctp';
148
+		$expected = CAKE.'Test'.DS.'test_app'.DS.'View'.DS.'Themed'.DS.'TestTheme'.DS.'Plugin'.DS.'TestPlugin'.DS.'Tests'.DS.'index.ctp';
149 149
 		$result = $ThemeView->getViewFileName('index');
150 150
 		$this->assertEquals($expected, $result);
151 151
 
152
-		$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Plugin' . DS . 'TestPlugin' . DS . 'Layouts' . DS . 'plugin_default.ctp';
152
+		$expected = CAKE.'Test'.DS.'test_app'.DS.'View'.DS.'Themed'.DS.'TestTheme'.DS.'Plugin'.DS.'TestPlugin'.DS.'Layouts'.DS.'plugin_default.ctp';
153 153
 		$result = $ThemeView->getLayoutFileName('plugin_default');
154 154
 		$this->assertEquals($expected, $result);
155 155
 
156
-		$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Layouts' . DS . 'default.ctp';
156
+		$expected = CAKE.'Test'.DS.'test_app'.DS.'View'.DS.'Themed'.DS.'TestTheme'.DS.'Layouts'.DS.'default.ctp';
157 157
 		$result = $ThemeView->getLayoutFileName('default');
158 158
 		$this->assertEquals($expected, $result);
159 159
 	}
@@ -172,25 +172,25 @@  discard block
 block discarded – undo
172 172
 
173 173
 		$ThemeView = new TestTheme2View($this->Controller);
174 174
 		$ThemeView->theme = 'TestTheme';
175
-		$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Pages' . DS . 'home.ctp';
175
+		$expected = CAKE.'Test'.DS.'test_app'.DS.'View'.DS.'Pages'.DS.'home.ctp';
176 176
 		$result = $ThemeView->getViewFileName('home');
177 177
 		$this->assertEquals($expected, $result);
178 178
 
179
-		$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Posts' . DS . 'index.ctp';
179
+		$expected = CAKE.'Test'.DS.'test_app'.DS.'View'.DS.'Themed'.DS.'TestTheme'.DS.'Posts'.DS.'index.ctp';
180 180
 		$result = $ThemeView->getViewFileName('/Posts/index');
181 181
 		$this->assertEquals($expected, $result);
182 182
 
183
-		$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Layouts' . DS . 'default.ctp';
183
+		$expected = CAKE.'Test'.DS.'test_app'.DS.'View'.DS.'Themed'.DS.'TestTheme'.DS.'Layouts'.DS.'default.ctp';
184 184
 		$result = $ThemeView->getLayoutFileName();
185 185
 		$this->assertEquals($expected, $result);
186 186
 
187 187
 		$ThemeView->layoutPath = 'rss';
188
-		$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS . 'rss' . DS . 'default.ctp';
188
+		$expected = CAKE.'Test'.DS.'test_app'.DS.'View'.DS.'Layouts'.DS.'rss'.DS.'default.ctp';
189 189
 		$result = $ThemeView->getLayoutFileName();
190 190
 		$this->assertEquals($expected, $result);
191 191
 
192
-		$ThemeView->layoutPath = 'Emails' . DS . 'html';
193
-		$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS . 'Emails' . DS . 'html' . DS . 'default.ctp';
192
+		$ThemeView->layoutPath = 'Emails'.DS.'html';
193
+		$expected = CAKE.'Test'.DS.'test_app'.DS.'View'.DS.'Layouts'.DS.'Emails'.DS.'html'.DS.'default.ctp';
194 194
 		$result = $ThemeView->getLayoutFileName();
195 195
 		$this->assertEquals($expected, $result);
196 196
 	}
Please login to merge, or discard this patch.
lib/Cake/TestSuite/CakeTestLoader.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
  *
45 45
  * @param string $filePath
46 46
  * @param string $params
47
- * @return void
47
+ * @return string
48 48
  */
49 49
 	protected function _resolveTestFile($filePath, $params) {
50 50
 		$basePath = $this->_basePath($params) . DS . $filePath;
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 /**
56 56
  * Generates the base path to a set of tests based on the parameters.
57 57
  *
58
- * @param array $params
58
+ * @param string $params
59 59
  * @return string The base path.
60 60
  */
61 61
 	protected static function _basePath($params) {
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
  * @return void
48 48
  */
49 49
 	protected function _resolveTestFile($filePath, $params) {
50
-		$basePath = $this->_basePath($params) . DS . $filePath;
50
+		$basePath = $this->_basePath($params).DS.$filePath;
51 51
 		$ending = 'Test.php';
52
-		return (strpos($basePath, $ending) === (strlen($basePath) - strlen($ending))) ? $basePath : $basePath . $ending;
52
+		return (strpos($basePath, $ending) === (strlen($basePath) - strlen($ending))) ? $basePath : $basePath.$ending;
53 53
 	}
54 54
 
55 55
 /**
@@ -60,19 +60,19 @@  discard block
 block discarded – undo
60 60
  */
61 61
 	protected static function _basePath($params) {
62 62
 		$result = null;
63
-		if (!empty($params['core'])) {
63
+		if ( ! empty($params['core'])) {
64 64
 			$result = CORE_TEST_CASES;
65
-		} elseif (!empty($params['plugin'])) {
66
-			if (!CakePlugin::loaded($params['plugin'])) {
65
+		} elseif ( ! empty($params['plugin'])) {
66
+			if ( ! CakePlugin::loaded($params['plugin'])) {
67 67
 				try {
68 68
 					CakePlugin::load($params['plugin']);
69
-					$result = CakePlugin::path($params['plugin']) . 'Test' . DS . 'Case';
69
+					$result = CakePlugin::path($params['plugin']).'Test'.DS.'Case';
70 70
 				} catch (MissingPluginException $e) {
71 71
 				}
72 72
 			} else {
73
-				$result = CakePlugin::path($params['plugin']) . 'Test' . DS . 'Case';
73
+				$result = CakePlugin::path($params['plugin']).'Test'.DS.'Case';
74 74
 			}
75
-		} elseif (!empty($params['app'])) {
75
+		} elseif ( ! empty($params['app'])) {
76 76
 			$result = APP_TEST_CASES;
77 77
 		}
78 78
 		return $result;
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
 		$testCases = array();
92 92
 		foreach ($fileList as $testCaseFile) {
93
-			$case = str_replace($directory . DS, '', $testCaseFile);
93
+			$case = str_replace($directory.DS, '', $testCaseFile);
94 94
 			$case = str_replace('Test.php', '', $case);
95 95
 			$testCases[$testCaseFile] = $case;
96 96
 		}
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
  */
108 108
 	protected static function _getRecursiveFileList($directory = '.') {
109 109
 		$fileList = array();
110
-		if (!is_dir($directory)) {
110
+		if ( ! is_dir($directory)) {
111 111
 			return $fileList;
112 112
 		}
113 113
 
Please login to merge, or discard this patch.
lib/Cake/TestSuite/CakeTestRunner.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
  *
43 43
  * @param PHPUnit_Framework_Test $suite
44 44
  * @param array $arguments
45
- * @return void
45
+ * @return PHPUnit_Framework_TestResult
46 46
  */
47 47
 	public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array()) {
48 48
 		if (isset($arguments['printer'])) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
  */
71 71
 	protected function createTestResult() {
72 72
 		$result = new PHPUnit_Framework_TestResult;
73
-		if (!empty($this->_params['codeCoverage'])) {
73
+		if ( ! empty($this->_params['codeCoverage'])) {
74 74
 			if (method_exists($result, 'collectCodeCoverageInformation')) {
75 75
 				$result->collectCodeCoverageInformation(true);
76 76
 			}
Please login to merge, or discard this patch.
lib/Cake/TestSuite/CakeTestSuiteCommand.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 /**
36 36
  * Construct method
37 37
  *
38
- * @param mixed $loader
38
+ * @param string $loader
39 39
  * @param array $params list of options to be used for this run
40 40
  * @throws MissingTestLoaderException When a loader class could not be found.
41 41
  */
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
  * @throws MissingTestLoaderException When a loader class could not be found.
41 41
  */
42 42
 	public function __construct($loader, $params = array()) {
43
-		if ($loader && !class_exists($loader)) {
43
+		if ($loader && ! class_exists($loader)) {
44 44
 			throw new MissingTestLoaderException(array('class' => $loader));
45 45
 		}
46 46
 		$this->arguments['loader'] = $loader;
@@ -95,13 +95,13 @@  discard block
 block discarded – undo
95 95
 		try {
96 96
 			$result = $runner->doRun($suite, $this->arguments);
97 97
 		} catch (PHPUnit_Framework_Exception $e) {
98
-			print $e->getMessage() . "\n";
98
+			print $e->getMessage()."\n";
99 99
 		}
100 100
 
101 101
 		if ($exit) {
102 102
 			if (isset($result) && $result->wasSuccessful()) {
103 103
 				exit(PHPUnit_TextUI_TestRunner::SUCCESS_EXIT);
104
-			} elseif (!isset($result) || $result->errorCount() > 0) {
104
+			} elseif ( ! isset($result) || $result->errorCount() > 0) {
105 105
 				exit(PHPUnit_TextUI_TestRunner::EXCEPTION_EXIT);
106 106
 			}
107 107
 			exit(PHPUnit_TextUI_TestRunner::FAILURE_EXIT);
@@ -138,13 +138,13 @@  discard block
 block discarded – undo
138 138
 		$object = null;
139 139
 
140 140
 		$reporter = ucwords($reporter);
141
-		$coreClass = 'Cake' . $reporter . 'Reporter';
141
+		$coreClass = 'Cake'.$reporter.'Reporter';
142 142
 		App::uses($coreClass, 'TestSuite/Reporter');
143 143
 
144
-		$appClass = $reporter . 'Reporter';
144
+		$appClass = $reporter.'Reporter';
145 145
 		App::uses($appClass, 'TestSuite/Reporter');
146 146
 
147
-		if (!class_exists($appClass)) {
147
+		if ( ! class_exists($appClass)) {
148 148
 			$object = new $coreClass(null, $this->_params);
149 149
 		} else {
150 150
 			$object = new $appClass(null, $this->_params);
Please login to merge, or discard this patch.
lib/Cake/TestSuite/Coverage/BaseCoverageReport.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 /**
96 96
  * Gets the base path that the files we are interested in live in.
97 97
  *
98
- * @return void
98
+ * @return string
99 99
  */
100 100
 	public function getPathFilter() {
101 101
 		$path = ROOT . DS;
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
  *
137 137
  * @param array $fileLines
138 138
  * @param array $coverageData
139
- * @return array Array of covered, total lines.
139
+ * @return integer[] Array of covered, total lines.
140 140
  */
141 141
 	protected function _calculateCoveredLines($fileLines, $coverageData) {
142 142
 		$covered = $total = 0;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
  * @return void
99 99
  */
100 100
 	public function getPathFilter() {
101
-		$path = ROOT . DS;
101
+		$path = ROOT.DS;
102 102
 		if ($this->appTest) {
103
-			$path .= APP_DIR . DS;
103
+			$path .= APP_DIR.DS;
104 104
 		} elseif ($this->pluginTest) {
105 105
 			$path = App::pluginPath($this->pluginTest);
106 106
 		} else {
@@ -146,10 +146,10 @@  discard block
 block discarded – undo
146 146
 		unset($fileLines[0]);
147 147
 
148 148
 		foreach ($fileLines as $lineno => $line) {
149
-			if (!isset($coverageData[$lineno])) {
149
+			if ( ! isset($coverageData[$lineno])) {
150 150
 				continue;
151 151
 			}
152
-			if (is_array($coverageData[$lineno]) && !empty($coverageData[$lineno])) {
152
+			if (is_array($coverageData[$lineno]) && ! empty($coverageData[$lineno])) {
153 153
 				$covered++;
154 154
 				$total++;
155 155
 			} elseif ($coverageData[$lineno] === -1 || $coverageData[$lineno] === array()) {
Please login to merge, or discard this patch.