Completed
Push — master ( 256a55...3c651b )
by Reginaldo
31:32 queued 13:53
created
lib/Cake/Test/Case/Console/Command/ApiShellTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
 		$this->Shell->expects($this->at(2))->method('out')->with($expected);
90 90
 
91 91
 		$this->Shell->args = array('controller');
92
-		$this->Shell->paths['controller'] = CAKE . 'Controller' . DS;
92
+		$this->Shell->paths['controller'] = CAKE.'Controller'.DS;
93 93
 		$this->Shell->main();
94 94
 	}
95 95
 }
Please login to merge, or discard this patch.
lib/Cake/Test/Case/Console/Command/BakeShellTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 App::uses('DbConfigTask', 'Console/Command/Task');
27 27
 App::uses('Controller', 'Controller');
28 28
 
29
-if (!class_exists('UsersController')) {
29
+if ( ! class_exists('UsersController')) {
30 30
 	class UsersController extends Controller {
31 31
 	}
32 32
 }
Please login to merge, or discard this patch.
lib/Cake/Test/Case/Console/Command/CommandListShellTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,10 +52,10 @@
 block discarded – undo
52 52
 		parent::setUp();
53 53
 		App::build(array(
54 54
 			'Plugin' => array(
55
-				CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
55
+				CAKE.'Test'.DS.'test_app'.DS.'Plugin'.DS
56 56
 			),
57 57
 			'Console/Command' => array(
58
-				CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS
58
+				CAKE.'Test'.DS.'test_app'.DS.'Console'.DS.'Command'.DS
59 59
 			)
60 60
 		), App::RESET);
61 61
 		CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
Please login to merge, or discard this patch.
lib/Cake/Test/Case/Console/Command/SchemaShellTest.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
  */
122 122
 	public function tearDown() {
123 123
 		parent::tearDown();
124
-		if (!empty($this->file) && $this->file instanceof File) {
124
+		if ( ! empty($this->file) && $this->file instanceof File) {
125 125
 			$this->file->delete();
126 126
 			unset($this->file);
127 127
 		}
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 		$this->assertEquals('TestSchema', $this->Shell->Schema->name);
148 148
 		$this->assertEquals('test_schema.php', $this->Shell->Schema->file);
149 149
 		$this->assertEquals('default', $this->Shell->Schema->connection);
150
-		$this->assertEquals(APP . 'Config' . DS . 'Schema', $this->Shell->Schema->path);
150
+		$this->assertEquals(APP.'Config'.DS.'Schema', $this->Shell->Schema->path);
151 151
 
152 152
 		$this->Shell->Schema = null;
153 153
 		$this->Shell->params = array(
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
  */
170 170
 	public function testView() {
171 171
 		$this->Shell->startup();
172
-		$this->Shell->Schema->path = APP . 'Config' . DS . 'Schema';
172
+		$this->Shell->Schema->path = APP.'Config'.DS.'Schema';
173 173
 		$this->Shell->params['file'] = 'i18n.php';
174 174
 		$this->Shell->expects($this->once())->method('_stop');
175 175
 		$this->Shell->expects($this->once())->method('out');
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
  */
184 184
 	public function testViewWithPlugins() {
185 185
 		App::build(array(
186
-			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
186
+			'Plugin' => array(CAKE.'Test'.DS.'test_app'.DS.'Plugin'.DS)
187 187
 		));
188 188
 		CakePlugin::load('TestPlugin');
189 189
 		$this->Shell->args = array('TestPlugin.schema');
@@ -210,13 +210,13 @@  discard block
 block discarded – undo
210 210
 		$this->Shell->params = array(
211 211
 			'name' => 'i18n',
212 212
 			'connection' => 'test',
213
-			'write' => TMP . 'tests' . DS . 'i18n.sql'
213
+			'write' => TMP.'tests'.DS.'i18n.sql'
214 214
 		);
215 215
 		$this->Shell->expects($this->once())->method('_stop');
216 216
 		$this->Shell->startup();
217 217
 		$this->Shell->dump();
218 218
 
219
-		$this->file = new File(TMP . 'tests' . DS . 'i18n.sql');
219
+		$this->file = new File(TMP.'tests'.DS.'i18n.sql');
220 220
 		$contents = $this->file->read();
221 221
 		$this->assertRegExp('/DROP TABLE/', $contents);
222 222
 		$this->assertRegExp('/CREATE TABLE.*?i18n/', $contents);
@@ -235,19 +235,19 @@  discard block
 block discarded – undo
235 235
  */
236 236
 	public function testDumpFileWritingWithPlugins() {
237 237
 		App::build(array(
238
-			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
238
+			'Plugin' => array(CAKE.'Test'.DS.'test_app'.DS.'Plugin'.DS)
239 239
 		));
240 240
 		CakePlugin::load('TestPlugin');
241 241
 		$this->Shell->args = array('TestPlugin.TestPluginApp');
242 242
 		$this->Shell->params = array(
243 243
 			'connection' => 'test',
244
-			'write' => TMP . 'tests' . DS . 'dump_test.sql'
244
+			'write' => TMP.'tests'.DS.'dump_test.sql'
245 245
 		);
246 246
 		$this->Shell->startup();
247 247
 		$this->Shell->expects($this->once())->method('_stop');
248 248
 		$this->Shell->dump();
249 249
 
250
-		$this->file = new File(TMP . 'tests' . DS . 'dump_test.sql');
250
+		$this->file = new File(TMP.'tests'.DS.'dump_test.sql');
251 251
 		$contents = $this->file->read();
252 252
 
253 253
 		$this->assertRegExp('/CREATE TABLE.*?test_plugin_acos/', $contents);
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
  * @return void
286 286
  */
287 287
 	public function testGenerateNoOverwrite() {
288
-		touch(TMP . 'schema.php');
288
+		touch(TMP.'schema.php');
289 289
 		$this->Shell->params['file'] = 'schema.php';
290 290
 		$this->Shell->params['force'] = false;
291 291
 		$this->Shell->args = array();
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 		$this->Shell->Schema->expects($this->never())->method('read');
297 297
 
298 298
 		$this->Shell->generate();
299
-		unlink(TMP . 'schema.php');
299
+		unlink(TMP.'schema.php');
300 300
 	}
301 301
 
302 302
 /**
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
  * @return void
306 306
  */
307 307
 	public function testGenerateOverwrite() {
308
-		touch(TMP . 'schema.php');
308
+		touch(TMP.'schema.php');
309 309
 		$this->Shell->params['file'] = 'schema.php';
310 310
 		$this->Shell->params['force'] = false;
311 311
 		$this->Shell->args = array();
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 			->with(array('schema data', 'file' => 'schema.php'));
326 326
 
327 327
 		$this->Shell->generate();
328
-		unlink(TMP . 'schema.php');
328
+		unlink(TMP.'schema.php');
329 329
 	}
330 330
 
331 331
 /**
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
  */
337 337
 	public function testGenerateWithPlugins() {
338 338
 		App::build(array(
339
-			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
339
+			'Plugin' => array(CAKE.'Test'.DS.'test_app'.DS.'Plugin'.DS)
340 340
 		), App::RESET);
341 341
 		CakePlugin::load('TestPlugin');
342 342
 
@@ -347,10 +347,10 @@  discard block
 block discarded – undo
347 347
 			'force' => false
348 348
 		);
349 349
 		$this->Shell->startup();
350
-		$this->Shell->Schema->path = TMP . 'tests' . DS;
350
+		$this->Shell->Schema->path = TMP.'tests'.DS;
351 351
 
352 352
 		$this->Shell->generate();
353
-		$this->file = new File(TMP . 'tests' . DS . 'schema.php');
353
+		$this->file = new File(TMP.'tests'.DS.'schema.php');
354 354
 		$contents = $this->file->read();
355 355
 
356 356
 		$this->assertRegExp('/class TestPluginSchema/', $contents);
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
  */
371 371
 	public function testGenerateModels() {
372 372
 		App::build(array(
373
-			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
373
+			'Plugin' => array(CAKE.'Test'.DS.'test_app'.DS.'Plugin'.DS)
374 374
 		), App::RESET);
375 375
 		CakePlugin::load('TestPlugin');
376 376
 
@@ -383,10 +383,10 @@  discard block
 block discarded – undo
383 383
 			'overwrite' => true
384 384
 		);
385 385
 		$this->Shell->startup();
386
-		$this->Shell->Schema->path = TMP . 'tests' . DS;
386
+		$this->Shell->Schema->path = TMP.'tests'.DS;
387 387
 
388 388
 		$this->Shell->generate();
389
-		$this->file = new File(TMP . 'tests' . DS . 'schema.php');
389
+		$this->file = new File(TMP.'tests'.DS.'schema.php');
390 390
 		$contents = $this->file->read();
391 391
 
392 392
 		$this->assertRegExp('/class TestPluginSchema/', $contents);
@@ -413,10 +413,10 @@  discard block
 block discarded – undo
413 413
 			'exclude' => 'acos, aros',
414 414
 		);
415 415
 		$this->Shell->startup();
416
-		$this->Shell->Schema->path = TMP . 'tests' . DS;
416
+		$this->Shell->Schema->path = TMP.'tests'.DS;
417 417
 
418 418
 		$this->Shell->generate();
419
-		$this->file = new File(TMP . 'tests' . DS . 'schema.php');
419
+		$this->file = new File(TMP.'tests'.DS.'schema.php');
420 420
 		$contents = $this->file->read();
421 421
 
422 422
 		$this->assertNotContains('public $acos = array(', $contents);
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 
443 443
 		$db->cacheSources = false;
444 444
 		$sources = $db->listSources();
445
-		$this->assertTrue(in_array($db->config['prefix'] . 'i18n', $sources));
445
+		$this->assertTrue(in_array($db->config['prefix'].'i18n', $sources));
446 446
 
447 447
 		$schema = new i18nSchema();
448 448
 		$db->execute($db->dropSchema($schema));
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 		$this->Shell->params = array(
463 463
 			'connection' => 'test',
464 464
 			'name' => 'I18n',
465
-			'path' => APP . 'Config' . DS . 'Schema'
465
+			'path' => APP.'Config'.DS.'Schema'
466 466
 		);
467 467
 		$this->Shell->args = array('I18n', 'i18n');
468 468
 		$this->Shell->startup();
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
 		$db = ConnectionManager::getDataSource('test');
473 473
 		$db->cacheSources = false;
474 474
 		$sources = $db->listSources();
475
-		$this->assertTrue(in_array($db->config['prefix'] . 'i18n', $sources), 'i18n should be present.');
475
+		$this->assertTrue(in_array($db->config['prefix'].'i18n', $sources), 'i18n should be present.');
476 476
 
477 477
 		$schema = new I18nSchema();
478 478
 		$db->execute($db->dropSchema($schema, 'i18n'));
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
  */
542 542
 	public function testPluginParam() {
543 543
 		App::build(array(
544
-			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
544
+			'Plugin' => array(CAKE.'Test'.DS.'test_app'.DS.'Plugin'.DS)
545 545
 		));
546 546
 		CakePlugin::load('TestPlugin');
547 547
 		$this->Shell->params = array(
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
 			'connection' => 'test'
550 550
 		);
551 551
 		$this->Shell->startup();
552
-		$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS . 'Config' . DS . 'Schema';
552
+		$expected = CAKE.'Test'.DS.'test_app'.DS.'Plugin'.DS.'TestPlugin'.DS.'Config'.DS.'Schema';
553 553
 		$this->assertEquals($expected, $this->Shell->Schema->path);
554 554
 		CakePlugin::unload();
555 555
 	}
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
  */
562 562
 	public function testName() {
563 563
 		App::build(array(
564
-			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
564
+			'Plugin' => array(CAKE.'Test'.DS.'test_app'.DS.'Plugin'.DS)
565 565
 		));
566 566
 		CakePlugin::load('TestPlugin');
567 567
 		$this->Shell->params = array(
@@ -572,14 +572,14 @@  discard block
 block discarded – undo
572 572
 			'overwrite' => true,
573 573
 		);
574 574
 		$this->Shell->startup();
575
-		if (file_exists($this->Shell->Schema->path . DS . 'custom_name.php')) {
576
-			unlink($this->Shell->Schema->path . DS . 'custom_name.php');
575
+		if (file_exists($this->Shell->Schema->path.DS.'custom_name.php')) {
576
+			unlink($this->Shell->Schema->path.DS.'custom_name.php');
577 577
 		}
578 578
 		$this->Shell->generate();
579 579
 
580
-		$contents = file_get_contents($this->Shell->Schema->path . DS . 'custom_name.php');
580
+		$contents = file_get_contents($this->Shell->Schema->path.DS.'custom_name.php');
581 581
 		$this->assertRegExp('/class CustomNameSchema/', $contents);
582
-		unlink($this->Shell->Schema->path . DS . 'custom_name.php');
582
+		unlink($this->Shell->Schema->path.DS.'custom_name.php');
583 583
 		CakePlugin::unload();
584 584
 	}
585 585
 
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
  */
592 592
 	public function testNameAndFile() {
593 593
 		App::build(array(
594
-			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
594
+			'Plugin' => array(CAKE.'Test'.DS.'test_app'.DS.'Plugin'.DS)
595 595
 		));
596 596
 		CakePlugin::load('TestPlugin');
597 597
 		$this->Shell->params = array(
@@ -603,7 +603,7 @@  discard block
 block discarded – undo
603 603
 			'overwrite' => true,
604 604
 		);
605 605
 		$this->Shell->startup();
606
-		$file = $this->Shell->Schema->path . DS . 'other_name.php';
606
+		$file = $this->Shell->Schema->path.DS.'other_name.php';
607 607
 		if (file_exists($file)) {
608 608
 			unlink($file);
609 609
 		}
@@ -626,7 +626,7 @@  discard block
 block discarded – undo
626 626
  */
627 627
 	public function testPluginDotSyntaxWithCreate() {
628 628
 		App::build(array(
629
-			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
629
+			'Plugin' => array(CAKE.'Test'.DS.'test_app'.DS.'Plugin'.DS)
630 630
 		));
631 631
 		CakePlugin::load('TestPlugin');
632 632
 		$this->Shell->params = array(
@@ -639,7 +639,7 @@  discard block
 block discarded – undo
639 639
 
640 640
 		$db = ConnectionManager::getDataSource('test');
641 641
 		$sources = $db->listSources();
642
-		$this->assertTrue(in_array($db->config['prefix'] . 'test_plugin_acos', $sources));
642
+		$this->assertTrue(in_array($db->config['prefix'].'test_plugin_acos', $sources));
643 643
 
644 644
 		$schema = new TestPluginAppSchema();
645 645
 		$db->execute($db->dropSchema($schema, 'test_plugin_acos'));
Please login to merge, or discard this patch.
lib/Cake/Test/Case/Console/Command/Task/ControllerTaskTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 App::uses('BakeTags', 'Model');
36 36
 $imported = class_exists('BakeArticle') || class_exists('BakeComment') || class_exists('BakeTag');
37 37
 
38
-if (!$imported) {
38
+if ( ! $imported) {
39 39
 	define('ARTICLE_MODEL_CREATED', true);
40 40
 
41 41
 /**
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 		);
92 92
 		$this->Task->Test = $this->getMock('TestTask', array(), array($out, $out, $in));
93 93
 
94
-		if (!defined('ARTICLE_MODEL_CREATED')) {
94
+		if ( ! defined('ARTICLE_MODEL_CREATED')) {
95 95
 			$this->markTestSkipped('Could not run as an Article, Tag or Comment model was already loaded.');
96 96
 		}
97 97
 	}
@@ -281,15 +281,15 @@  discard block
 block discarded – undo
281 281
 		$this->Task->expects($this->any())->method('createFile')->will($this->returnValue(true));
282 282
 
283 283
 		$result = $this->Task->bake('Articles', null, $helpers, $components);
284
-		$expected = file_get_contents(CAKE . 'Test' . DS . 'bake_compare' . DS . 'Controller' . DS . 'NoActions.ctp');
284
+		$expected = file_get_contents(CAKE.'Test'.DS.'bake_compare'.DS.'Controller'.DS.'NoActions.ctp');
285 285
 		$this->assertTextEquals($expected, $result);
286 286
 
287 287
 		$result = $this->Task->bake('Articles', null, array(), array());
288
-		$expected = file_get_contents(CAKE . 'Test' . DS . 'bake_compare' . DS . 'Controller' . DS . 'NoHelpersOrComponents.ctp');
288
+		$expected = file_get_contents(CAKE.'Test'.DS.'bake_compare'.DS.'Controller'.DS.'NoHelpersOrComponents.ctp');
289 289
 		$this->assertTextEquals($expected, $result);
290 290
 
291 291
 		$result = $this->Task->bake('Articles', 'scaffold', $helpers, $components);
292
-		$expected = file_get_contents(CAKE . 'Test' . DS . 'bake_compare' . DS . 'Controller' . DS . 'Scaffold.ctp');
292
+		$expected = file_get_contents(CAKE.'Test'.DS.'bake_compare'.DS.'Controller'.DS.'Scaffold.ctp');
293 293
 		$this->assertTextEquals($expected, $result);
294 294
 	}
295 295
 
@@ -302,8 +302,8 @@  discard block
 block discarded – undo
302 302
 		$this->Task->plugin = 'ControllerTest';
303 303
 
304 304
 		//fake plugin path
305
-		CakePlugin::load('ControllerTest', array('path' => APP . 'Plugin' . DS . 'ControllerTest' . DS));
306
-		$path = APP . 'Plugin' . DS . 'ControllerTest' . DS . 'Controller' . DS . 'ArticlesController.php';
305
+		CakePlugin::load('ControllerTest', array('path' => APP.'Plugin'.DS.'ControllerTest'.DS));
306
+		$path = APP.'Plugin'.DS.'ControllerTest'.DS.'Controller'.DS.'ArticlesController.php';
307 307
 
308 308
 		$this->Task->expects($this->at(1))->method('createFile')->with(
309 309
 			$path,
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 		$this->Task->bake('Articles', '--actions--', array(), array(), array());
318 318
 
319 319
 		$this->Task->plugin = 'ControllerTest';
320
-		$path = APP . 'Plugin' . DS . 'ControllerTest' . DS . 'Controller' . DS . 'ArticlesController.php';
320
+		$path = APP.'Plugin'.DS.'ControllerTest'.DS.'Controller'.DS.'ArticlesController.php';
321 321
 		$result = $this->Task->bake('Articles', '--actions--', array(), array(), array());
322 322
 
323 323
 		$this->assertContains("App::uses('ControllerTestAppController', 'ControllerTest.Controller');", $result);
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
  */
335 335
 	public function testBakeActionsUsingSessions() {
336 336
 		$result = $this->Task->bakeActions('BakeArticles', null, true);
337
-		$expected = file_get_contents(CAKE . 'Test' . DS . 'bake_compare' . DS . 'Controller' . DS . 'ActionsUsingSessions.ctp');
337
+		$expected = file_get_contents(CAKE.'Test'.DS.'bake_compare'.DS.'Controller'.DS.'ActionsUsingSessions.ctp');
338 338
 		$this->assertTextEquals($expected, $result);
339 339
 
340 340
 		$result = $this->Task->bakeActions('BakeArticles', 'admin_', true);
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
  */
353 353
 	public function testBakeActionsWithNoSessions() {
354 354
 		$result = $this->Task->bakeActions('BakeArticles', null, false);
355
-		$expected = file_get_contents(CAKE . 'Test' . DS . 'bake_compare' . DS . 'Controller' . DS . 'ActionsWithNoSessions.ctp');
355
+		$expected = file_get_contents(CAKE.'Test'.DS.'bake_compare'.DS.'Controller'.DS.'ActionsWithNoSessions.ctp');
356 356
 		$this->assertTextEquals($expected, $result);
357 357
 	}
358 358
 
Please login to merge, or discard this patch.
lib/Cake/Test/Case/Console/Command/Task/DbConfigTaskTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 			array($out, $out, $in)
45 45
 		);
46 46
 
47
-		$this->Task->path = APP . 'Config' . DS;
47
+		$this->Task->path = APP.'Config'.DS;
48 48
 	}
49 49
 
50 50
 /**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	public function testInitialize() {
80 80
 		$this->Task->initialize();
81 81
 		$this->assertFalse(empty($this->Task->path));
82
-		$this->assertEquals(APP . 'Config' . DS, $this->Task->path);
82
+		$this->assertEquals(APP.'Config'.DS, $this->Task->path);
83 83
 	}
84 84
 
85 85
 /**
Please login to merge, or discard this patch.
lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php 1 patch
Spacing   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
 			array('in', 'out', 'err', '_stop'),
48 48
 			array($out, $out, $in)
49 49
 		);
50
-		$this->path = TMP . 'tests' . DS . 'extract_task_test';
51
-		new Folder($this->path . DS . 'locale', true);
50
+		$this->path = TMP.'tests'.DS.'extract_task_test';
51
+		new Folder($this->path.DS.'locale', true);
52 52
 	}
53 53
 
54 54
 /**
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
 	public function testExecute() {
74 74
 		$this->Task->interactive = false;
75 75
 
76
-		$this->Task->params['paths'] = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Pages';
77
-		$this->Task->params['output'] = $this->path . DS;
76
+		$this->Task->params['paths'] = CAKE.'Test'.DS.'test_app'.DS.'View'.DS.'Pages';
77
+		$this->Task->params['output'] = $this->path.DS;
78 78
 		$this->Task->params['extract-core'] = 'no';
79 79
 		$this->Task->expects($this->never())->method('err');
80 80
 		$this->Task->expects($this->any())->method('in')
@@ -82,10 +82,10 @@  discard block
 block discarded – undo
82 82
 		$this->Task->expects($this->never())->method('_stop');
83 83
 
84 84
 		$this->Task->execute();
85
-		$this->assertTrue(file_exists($this->path . DS . 'default.pot'));
86
-		$result = file_get_contents($this->path . DS . 'default.pot');
85
+		$this->assertTrue(file_exists($this->path.DS.'default.pot'));
86
+		$result = file_get_contents($this->path.DS.'default.pot');
87 87
 
88
-		$this->assertFalse(file_exists($this->path . DS . 'cake.pot'));
88
+		$this->assertFalse(file_exists($this->path.DS.'cake.pot'));
89 89
 
90 90
 		$pattern = '/"Content-Type\: text\/plain; charset\=utf-8/';
91 91
 		$this->assertRegExp($pattern, $result);
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 		$this->assertContains("msgid \"single 'quoted'\"", $result, 'Strings with quotes not handled correctly');
164 164
 
165 165
 		// extract.ctp - reading the domain.pot
166
-		$result = file_get_contents($this->path . DS . 'domain.pot');
166
+		$result = file_get_contents($this->path.DS.'domain.pot');
167 167
 
168 168
 		$pattern = '/msgid "You have %d new message."\nmsgid_plural "You have %d new messages."/';
169 169
 		$this->assertNotRegExp($pattern, $result);
@@ -184,8 +184,8 @@  discard block
 block discarded – undo
184 184
 	public function testExtractCategory() {
185 185
 		$this->Task->interactive = false;
186 186
 
187
-		$this->Task->params['paths'] = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Pages';
188
-		$this->Task->params['output'] = $this->path . DS;
187
+		$this->Task->params['paths'] = CAKE.'Test'.DS.'test_app'.DS.'View'.DS.'Pages';
188
+		$this->Task->params['output'] = $this->path.DS;
189 189
 		$this->Task->params['extract-core'] = 'no';
190 190
 		$this->Task->params['merge'] = 'no';
191 191
 		$this->Task->expects($this->never())->method('err');
@@ -194,9 +194,9 @@  discard block
 block discarded – undo
194 194
 		$this->Task->expects($this->never())->method('_stop');
195 195
 
196 196
 		$this->Task->execute();
197
-		$this->assertTrue(file_exists($this->path . DS . 'LC_TIME' . DS . 'default.pot'));
197
+		$this->assertTrue(file_exists($this->path.DS.'LC_TIME'.DS.'default.pot'));
198 198
 
199
-		$result = file_get_contents($this->path . DS . 'default.pot');
199
+		$result = file_get_contents($this->path.DS.'default.pot');
200 200
 
201 201
 		$pattern = '/\#: .*extract\.ctp:31\n/';
202 202
 		$this->assertNotRegExp($pattern, $result);
@@ -210,8 +210,8 @@  discard block
 block discarded – undo
210 210
 	public function testExtractWithExclude() {
211 211
 		$this->Task->interactive = false;
212 212
 
213
-		$this->Task->params['paths'] = CAKE . 'Test' . DS . 'test_app' . DS . 'View';
214
-		$this->Task->params['output'] = $this->path . DS;
213
+		$this->Task->params['paths'] = CAKE.'Test'.DS.'test_app'.DS.'View';
214
+		$this->Task->params['output'] = $this->path.DS;
215 215
 		$this->Task->params['exclude'] = 'Pages,Layouts';
216 216
 		$this->Task->params['extract-core'] = 'no';
217 217
 
@@ -219,8 +219,8 @@  discard block
 block discarded – undo
219 219
 			->will($this->returnValue('y'));
220 220
 
221 221
 		$this->Task->execute();
222
-		$this->assertTrue(file_exists($this->path . DS . 'default.pot'));
223
-		$result = file_get_contents($this->path . DS . 'default.pot');
222
+		$this->assertTrue(file_exists($this->path.DS.'default.pot'));
223
+		$result = file_get_contents($this->path.DS.'default.pot');
224 224
 
225 225
 		$pattern = '/\#: .*extract\.ctp:6\n/';
226 226
 		$this->assertNotRegExp($pattern, $result);
@@ -238,16 +238,16 @@  discard block
 block discarded – undo
238 238
 		$this->Task->interactive = false;
239 239
 
240 240
 		$this->Task->params['paths'] =
241
-			CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Pages,' .
242
-			CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Posts';
241
+			CAKE.'Test'.DS.'test_app'.DS.'View'.DS.'Pages,'.
242
+			CAKE.'Test'.DS.'test_app'.DS.'View'.DS.'Posts';
243 243
 
244
-		$this->Task->params['output'] = $this->path . DS;
244
+		$this->Task->params['output'] = $this->path.DS;
245 245
 		$this->Task->params['extract-core'] = 'no';
246 246
 		$this->Task->expects($this->never())->method('err');
247 247
 		$this->Task->expects($this->never())->method('_stop');
248 248
 		$this->Task->execute();
249 249
 
250
-		$result = file_get_contents($this->path . DS . 'default.pot');
250
+		$result = file_get_contents($this->path.DS.'default.pot');
251 251
 
252 252
 		$pattern = '/msgid "Add User"/';
253 253
 		$this->assertRegExp($pattern, $result);
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
  */
261 261
 	public function testExtractExcludePlugins() {
262 262
 		App::build(array(
263
-			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
263
+			'Plugin' => array(CAKE.'Test'.DS.'test_app'.DS.'Plugin'.DS)
264 264
 		));
265 265
 		$this->out = $this->getMock('ConsoleOutput', array(), array(), '', false);
266 266
 		$this->in = $this->getMock('ConsoleInput', array(), array(), '', false);
@@ -270,12 +270,12 @@  discard block
 block discarded – undo
270 270
 		);
271 271
 		$this->Task->expects($this->exactly(2))->method('_isExtractingApp')->will($this->returnValue(true));
272 272
 
273
-		$this->Task->params['paths'] = CAKE . 'Test' . DS . 'test_app' . DS;
274
-		$this->Task->params['output'] = $this->path . DS;
273
+		$this->Task->params['paths'] = CAKE.'Test'.DS.'test_app'.DS;
274
+		$this->Task->params['output'] = $this->path.DS;
275 275
 		$this->Task->params['exclude-plugins'] = true;
276 276
 
277 277
 		$this->Task->execute();
278
-		$result = file_get_contents($this->path . DS . 'default.pot');
278
+		$result = file_get_contents($this->path.DS.'default.pot');
279 279
 		$this->assertNotRegExp('#TestPlugin#', $result);
280 280
 	}
281 281
 
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
  */
287 287
 	public function testExtractPlugin() {
288 288
 		App::build(array(
289
-			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
289
+			'Plugin' => array(CAKE.'Test'.DS.'test_app'.DS.'Plugin'.DS)
290 290
 		));
291 291
 
292 292
 		$this->out = $this->getMock('ConsoleOutput', array(), array(), '', false);
@@ -296,11 +296,11 @@  discard block
 block discarded – undo
296 296
 			array($this->out, $this->out, $this->in)
297 297
 		);
298 298
 
299
-		$this->Task->params['output'] = $this->path . DS;
299
+		$this->Task->params['output'] = $this->path.DS;
300 300
 		$this->Task->params['plugin'] = 'TestPlugin';
301 301
 
302 302
 		$this->Task->execute();
303
-		$result = file_get_contents($this->path . DS . 'default.pot');
303
+		$result = file_get_contents($this->path.DS.'default.pot');
304 304
 		$this->assertNotRegExp('#Pages#', $result);
305 305
 		$this->assertContains('translate.ctp:1', $result);
306 306
 		$this->assertContains('This is a translatable string', $result);
@@ -314,8 +314,8 @@  discard block
 block discarded – undo
314 314
  */
315 315
 	public function testExtractModelValidation() {
316 316
 		App::build(array(
317
-			'Model' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
318
-			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
317
+			'Model' => array(CAKE.'Test'.DS.'test_app'.DS.'Model'.DS),
318
+			'Plugin' => array(CAKE.'Test'.DS.'test_app'.DS.'Plugin'.DS)
319 319
 		), App::RESET);
320 320
 		$this->out = $this->getMock('ConsoleOutput', array(), array(), '', false);
321 321
 		$this->in = $this->getMock('ConsoleInput', array(), array(), '', false);
@@ -325,14 +325,14 @@  discard block
 block discarded – undo
325 325
 		);
326 326
 		$this->Task->expects($this->exactly(2))->method('_isExtractingApp')->will($this->returnValue(true));
327 327
 
328
-		$this->Task->params['paths'] = CAKE . 'Test' . DS . 'test_app' . DS;
329
-		$this->Task->params['output'] = $this->path . DS;
328
+		$this->Task->params['paths'] = CAKE.'Test'.DS.'test_app'.DS;
329
+		$this->Task->params['output'] = $this->path.DS;
330 330
 		$this->Task->params['extract-core'] = 'no';
331 331
 		$this->Task->params['exclude-plugins'] = true;
332 332
 		$this->Task->params['ignore-model-validation'] = false;
333 333
 
334 334
 		$this->Task->execute();
335
-		$result = file_get_contents($this->path . DS . 'default.pot');
335
+		$result = file_get_contents($this->path.DS.'default.pot');
336 336
 
337 337
 		$pattern = preg_quote('#Model/PersisterOne.php:validation for field title#', '\\');
338 338
 		$this->assertRegExp($pattern, $result);
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
  */
365 365
 	public function testExtractModelValidationWithDomainInModel() {
366 366
 		App::build(array(
367
-			'Model' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS . 'Model' . DS)
367
+			'Model' => array(CAKE.'Test'.DS.'test_app'.DS.'Plugin'.DS.'TestPlugin'.DS.'Model'.DS)
368 368
 		));
369 369
 		$this->out = $this->getMock('ConsoleOutput', array(), array(), '', false);
370 370
 		$this->in = $this->getMock('ConsoleInput', array(), array(), '', false);
@@ -374,14 +374,14 @@  discard block
 block discarded – undo
374 374
 		);
375 375
 		$this->Task->expects($this->exactly(2))->method('_isExtractingApp')->will($this->returnValue(true));
376 376
 
377
-		$this->Task->params['paths'] = CAKE . 'Test' . DS . 'test_app' . DS;
378
-		$this->Task->params['output'] = $this->path . DS;
377
+		$this->Task->params['paths'] = CAKE.'Test'.DS.'test_app'.DS;
378
+		$this->Task->params['output'] = $this->path.DS;
379 379
 		$this->Task->params['extract-core'] = 'no';
380 380
 		$this->Task->params['exclude-plugins'] = true;
381 381
 		$this->Task->params['ignore-model-validation'] = false;
382 382
 
383 383
 		$this->Task->execute();
384
-		$result = file_get_contents($this->path . DS . 'test_plugin.pot');
384
+		$result = file_get_contents($this->path.DS.'test_plugin.pot');
385 385
 
386 386
 		$pattern = preg_quote('#Plugin/TestPlugin/Model/TestPluginPost.php:validation for field title#', '\\');
387 387
 		$this->assertRegExp($pattern, $result);
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
  */
407 407
 	public function testExtractModelValidationInPlugin() {
408 408
 		App::build(array(
409
-			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
409
+			'Plugin' => array(CAKE.'Test'.DS.'test_app'.DS.'Plugin'.DS)
410 410
 		));
411 411
 		$this->out = $this->getMock('ConsoleOutput', array(), array(), '', false);
412 412
 		$this->in = $this->getMock('ConsoleInput', array(), array(), '', false);
@@ -415,12 +415,12 @@  discard block
 block discarded – undo
415 415
 			array($this->out, $this->out, $this->in)
416 416
 		);
417 417
 
418
-		$this->Task->params['output'] = $this->path . DS;
418
+		$this->Task->params['output'] = $this->path.DS;
419 419
 		$this->Task->params['ignore-model-validation'] = false;
420 420
 		$this->Task->params['plugin'] = 'TestPlugin';
421 421
 
422 422
 		$this->Task->execute();
423
-		$result = file_get_contents($this->path . DS . 'test_plugin.pot');
423
+		$result = file_get_contents($this->path.DS.'test_plugin.pot');
424 424
 
425 425
 		$pattern = preg_quote('#Model/TestPluginPost.php:validation for field title#', '\\');
426 426
 		$this->assertRegExp($pattern, $result);
@@ -449,17 +449,17 @@  discard block
 block discarded – undo
449 449
 	public function testExtractOverwrite() {
450 450
 		$this->Task->interactive = false;
451 451
 
452
-		$this->Task->params['paths'] = CAKE . 'Test' . DS . 'test_app' . DS;
453
-		$this->Task->params['output'] = $this->path . DS;
452
+		$this->Task->params['paths'] = CAKE.'Test'.DS.'test_app'.DS;
453
+		$this->Task->params['output'] = $this->path.DS;
454 454
 		$this->Task->params['extract-core'] = 'no';
455 455
 		$this->Task->params['overwrite'] = true;
456 456
 
457
-		file_put_contents($this->path . DS . 'default.pot', 'will be overwritten');
458
-		$this->assertTrue(file_exists($this->path . DS . 'default.pot'));
459
-		$original = file_get_contents($this->path . DS . 'default.pot');
457
+		file_put_contents($this->path.DS.'default.pot', 'will be overwritten');
458
+		$this->assertTrue(file_exists($this->path.DS.'default.pot'));
459
+		$original = file_get_contents($this->path.DS.'default.pot');
460 460
 
461 461
 		$this->Task->execute();
462
-		$result = file_get_contents($this->path . DS . 'default.pot');
462
+		$result = file_get_contents($this->path.DS.'default.pot');
463 463
 		$this->assertNotEquals($original, $result);
464 464
 	}
465 465
 
@@ -471,19 +471,19 @@  discard block
 block discarded – undo
471 471
 	public function testExtractCore() {
472 472
 		$this->Task->interactive = false;
473 473
 
474
-		$this->Task->params['paths'] = CAKE . 'Test' . DS . 'test_app' . DS;
475
-		$this->Task->params['output'] = $this->path . DS;
474
+		$this->Task->params['paths'] = CAKE.'Test'.DS.'test_app'.DS;
475
+		$this->Task->params['output'] = $this->path.DS;
476 476
 		$this->Task->params['extract-core'] = 'yes';
477 477
 
478 478
 		$this->Task->execute();
479
-		$this->assertTrue(file_exists($this->path . DS . 'cake.pot'));
480
-		$result = file_get_contents($this->path . DS . 'cake.pot');
479
+		$this->assertTrue(file_exists($this->path.DS.'cake.pot'));
480
+		$result = file_get_contents($this->path.DS.'cake.pot');
481 481
 
482 482
 		$pattern = '/msgid "Yesterday, %s"\nmsgstr ""\n/';
483 483
 		$this->assertRegExp($pattern, $result);
484 484
 
485
-		$this->assertTrue(file_exists($this->path . DS . 'cake_dev.pot'));
486
-		$result = file_get_contents($this->path . DS . 'cake_dev.pot');
485
+		$this->assertTrue(file_exists($this->path.DS.'cake_dev.pot'));
486
+		$result = file_get_contents($this->path.DS.'cake_dev.pot');
487 487
 
488 488
 		$pattern = '/#: Console\/Templates\//';
489 489
 		$this->assertNotRegExp($pattern, $result);
Please login to merge, or discard this patch.
lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 		$in = $this->getMock('ConsoleInput', array(), array(), '', false);
90 90
 
91 91
 		$Task = new FixtureTask($out, $out, $in);
92
-		$this->assertEquals(APP . 'Test' . DS . 'Fixture' . DS, $Task->path);
92
+		$this->assertEquals(APP.'Test'.DS.'Fixture'.DS, $Task->path);
93 93
 	}
94 94
 
95 95
 /**
@@ -440,10 +440,10 @@  discard block
 block discarded – undo
440 440
 		$this->Task->connection = 'test';
441 441
 		$this->Task->path = '/my/path/';
442 442
 		$this->Task->plugin = 'TestFixture';
443
-		$filename = APP . 'Plugin' . DS . 'TestFixture' . DS . 'Test' . DS . 'Fixture' . DS . 'ArticleFixture.php';
443
+		$filename = APP.'Plugin'.DS.'TestFixture'.DS.'Test'.DS.'Fixture'.DS.'ArticleFixture.php';
444 444
 
445 445
 		//fake plugin path
446
-		CakePlugin::load('TestFixture', array('path' => APP . 'Plugin' . DS . 'TestFixture' . DS));
446
+		CakePlugin::load('TestFixture', array('path' => APP.'Plugin'.DS.'TestFixture'.DS));
447 447
 		$this->Task->expects($this->at(0))->method('createFile')
448 448
 			->with($filename, $this->stringContains('class Article'));
449 449
 
Please login to merge, or discard this patch.
lib/Cake/Test/Case/Console/Command/Task/ModelTaskTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
 				//'on' => 'create', // Limit validation to 'create' or 'update' operations
767 767
 			),
768 768
 STRINGEND;
769
-		$this->assertRegExp('/' . preg_quote(str_replace("\r\n", "\n", $expected), '/') . '/', $result);
769
+		$this->assertRegExp('/'.preg_quote(str_replace("\r\n", "\n", $expected), '/').'/', $result);
770 770
 	}
771 771
 
772 772
 /**
@@ -836,8 +836,8 @@  discard block
 block discarded – undo
836 836
 		$this->Task->plugin = 'ControllerTest';
837 837
 
838 838
 		//fake plugin path
839
-		CakePlugin::load('ControllerTest', array('path' => APP . 'Plugin' . DS . 'ControllerTest' . DS));
840
-		$path = APP . 'Plugin' . DS . 'ControllerTest' . DS . 'Model' . DS . 'BakeArticle.php';
839
+		CakePlugin::load('ControllerTest', array('path' => APP.'Plugin'.DS.'ControllerTest'.DS));
840
+		$path = APP.'Plugin'.DS.'ControllerTest'.DS.'Model'.DS.'BakeArticle.php';
841 841
 		$this->Task->expects($this->once())->method('createFile')
842 842
 			->with($path, $this->stringContains('BakeArticle extends ControllerTestAppModel'));
843 843
 
Please login to merge, or discard this patch.