Skip to content

Commit f64f4cb

Browse files
author
AD7six
committed
whitespace normalization
1 parent 062f471 commit f64f4cb

File tree

13 files changed

+187
-41
lines changed

13 files changed

+187
-41
lines changed

cake/tests/cases/console/cake.test.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function stdout($string, $newline = true) {
116116
* @return void
117117
*/
118118
function clear() {
119-
119+
120120
}
121121

122122
/**
@@ -192,7 +192,6 @@ function testParseParams() {
192192
$Dispatcher->parseParams($params);
193193
$this->assertEqual($expected, $Dispatcher->params);
194194

195-
196195
$params = array('cake.php');
197196
$expected = array(
198197
'app' => 'app',
@@ -204,7 +203,6 @@ function testParseParams() {
204203
$Dispatcher->parseParams($params);
205204
$this->assertEqual($expected, $Dispatcher->params);
206205

207-
208206
$params = array(
209207
'cake.php',
210208
'-app',
@@ -220,7 +218,6 @@ function testParseParams() {
220218
$Dispatcher->parseParams($params);
221219
$this->assertEqual($expected, $Dispatcher->params);
222220

223-
224221
$params = array(
225222
'./cake.php',
226223
'bake',
@@ -241,7 +238,6 @@ function testParseParams() {
241238
$Dispatcher->parseParams($params);
242239
$this->assertEqual($expected, $Dispatcher->params);
243240

244-
245241
$params = array(
246242
'./console/cake.php',
247243
'bake',
@@ -260,7 +256,6 @@ function testParseParams() {
260256
$Dispatcher->parseParams($params);
261257
$this->assertEqual($expected, $Dispatcher->params);
262258

263-
264259
$params = array(
265260
'./console/cake.php',
266261
'bake',
@@ -281,7 +276,6 @@ function testParseParams() {
281276
$Dispatcher->parseParams($params);
282277
$this->assertEqual($expected, $Dispatcher->params);
283278

284-
285279
$params = array(
286280
'./console/cake.php',
287281
'-working',
@@ -307,11 +301,9 @@ function testParseParams() {
307301
$Dispatcher->parseParams($params);
308302
$this->assertEqual($expected, $Dispatcher->params);
309303

310-
311304
$expected = array('./console/cake.php', 'schema', 'run', 'create');
312305
$this->assertEqual($expected, $Dispatcher->args);
313306

314-
315307
$params = array(
316308
'/cake/1.2.x.x/cake/console/cake.php',
317309
'-working',
@@ -335,7 +327,6 @@ function testParseParams() {
335327
$Dispatcher->parseParams($params);
336328
$this->assertEqual($expected, $Dispatcher->params);
337329

338-
339330
$expected = array('/cake/1.2.x.x/cake/console/cake.php', 'schema', 'run', 'create');
340331
$this->assertEqual($expected, $Dispatcher->args);
341332
$params = array(
@@ -353,12 +344,10 @@ function testParseParams() {
353344
'root' => 'C:\wamp\www\apps\cake'
354345
);
355346

356-
357347
$Dispatcher->params = $Dispatcher->args = array();
358348
$Dispatcher->parseParams($params);
359349
$this->assertEqual($expected, $Dispatcher->params);
360350

361-
362351
$params = array(
363352
'cake.php',
364353
'-working',
@@ -377,7 +366,6 @@ function testParseParams() {
377366
$Dispatcher->parseParams($params);
378367
$this->assertEqual($expected, $Dispatcher->params);
379368

380-
381369
$params = array(
382370
'cake.php',
383371
'-working',
@@ -399,7 +387,6 @@ function testParseParams() {
399387
$Dispatcher->parseParams($params);
400388
$this->assertEqual($expected, $Dispatcher->params);
401389

402-
403390
$params = array(
404391
'/home/amelo/dev/cake-common/cake/console/cake.php',
405392
'-root',

cake/tests/cases/console/libs/tasks/db_config.test.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
require_once CAKE . 'console' . DS . 'libs' . DS . 'tasks' . DS . 'db_config.php';
3434
//require_once CAKE . 'console' . DS . 'libs' . DS . 'tasks' . DS . 'template.php';
3535

36-
3736
Mock::generatePartial(
3837
'ShellDispatcher', 'TestDbConfigTaskMockShellDispatcher',
3938
array('getInput', 'stdout', 'stderr', '_stop', '_initEnvironment')
@@ -54,7 +53,7 @@ class TEST_DATABASE_CONFIG {
5453
'database' => 'database_name',
5554
'prefix' => '',
5655
);
57-
56+
5857
var $otherOne = array(
5958
'driver' => 'mysql',
6059
'persistent' => false,
@@ -73,6 +72,7 @@ class TEST_DATABASE_CONFIG {
7372
* @subpackage cake.tests.cases.console.libs.tasks
7473
*/
7574
class DbConfigTaskTest extends CakeTestCase {
75+
7676
/**
7777
* startTest method
7878
*
@@ -88,6 +88,7 @@ function startTest() {
8888
$this->Task->params['working'] = rtrim(APP, '/');
8989
$this->Task->databaseClassName = 'TEST_DATABASE_CONFIG';
9090
}
91+
9192
/**
9293
* endTest method
9394
*
@@ -98,6 +99,7 @@ function endTest() {
9899
unset($this->Task, $this->Dispatcher);
99100
ClassRegistry::flush();
100101
}
102+
101103
/**
102104
* Test the getConfig method.
103105
*
@@ -108,6 +110,7 @@ function testGetConfig() {
108110
$result = $this->Task->getConfig();
109111
$this->assertEqual($result, 'otherOne');
110112
}
113+
111114
/**
112115
* test that initialize sets the path up.
113116
*
@@ -118,8 +121,9 @@ function testInitialize() {
118121
$this->Task->initialize();
119122
$this->assertFalse(empty($this->Task->path));
120123
$this->assertEqual($this->Task->path, APP . 'config' . DS);
121-
124+
122125
}
126+
123127
/**
124128
* test execute and by extension __interactive
125129
*

cake/tests/cases/console/libs/tasks/fixture.test.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,22 @@
4747
'Shell', 'MockFixtureModelTask',
4848
array('in', 'out', 'err', 'createFile', '_stop', 'getName', 'getTable', 'listAll')
4949
);
50+
5051
/**
5152
* FixtureTaskTest class
5253
*
5354
* @package cake
5455
* @subpackage cake.tests.cases.console.libs.tasks
5556
*/
5657
class FixtureTaskTest extends CakeTestCase {
58+
5759
/**
5860
* fixtures
5961
*
6062
* @var array
6163
**/
6264
var $fixtures = array('core.article', 'core.comment');
65+
6366
/**
6467
* startTest method
6568
*
@@ -75,6 +78,7 @@ function startTest() {
7578
$this->Task->Dispatch->shellPaths = App::path('shells');
7679
$this->Task->Template->initialize();
7780
}
81+
7882
/**
7983
* endTest method
8084
*
@@ -85,6 +89,7 @@ function endTest() {
8589
unset($this->Task, $this->Dispatcher);
8690
ClassRegistry::flush();
8791
}
92+
8893
/**
8994
* test that initialize sets the path
9095
*
@@ -97,6 +102,7 @@ function testConstruct() {
97102
$expected = '/my/path/tests/fixtures/';
98103
$this->assertEqual($Task->path, $expected);
99104
}
105+
100106
/**
101107
* test import option array generation
102108
*
@@ -117,14 +123,15 @@ function testImportOptions() {
117123
$result = $this->Task->importOptions('Article');
118124
$expected = array();
119125
$this->assertEqual($result, $expected);
120-
126+
121127
$this->Task->setReturnValueAt(5, 'in', 'n');
122128
$this->Task->setReturnValueAt(6, 'in', 'n');
123129
$this->Task->setReturnValueAt(7, 'in', 'y');
124130
$result = $this->Task->importOptions('Article');
125131
$expected = array('fromTable' => true);
126132
$this->assertEqual($result, $expected);
127133
}
134+
128135
/**
129136
* test generating a fixture with database conditions.
130137
*
@@ -143,6 +150,7 @@ function testImportRecordsFromDatabaseWithConditions() {
143150
$this->assertPattern('/Second Article/', $result, 'Missing import data %s');
144151
$this->assertPattern('/Third Article/', $result, 'Missing import data %s');
145152
}
153+
146154
/**
147155
* test that execute passes runs bake depending with named model.
148156
*
@@ -156,6 +164,7 @@ function testExecuteWithNamedModel() {
156164
$this->Task->expectAt(0, 'createFile', array($filename, new PatternExpectation('/class ArticleFixture/')));
157165
$this->Task->execute();
158166
}
167+
159168
/**
160169
* test that execute runs all() when args[0] = all
161170
*
@@ -175,6 +184,7 @@ function testExecuteIntoAll() {
175184
$this->Task->expectAt(1, 'createFile', array($filename, new PatternExpectation('/class CommentFixture/')));
176185
$this->Task->execute();
177186
}
187+
178188
/**
179189
* test interactive mode of execute
180190
*
@@ -183,7 +193,7 @@ function testExecuteIntoAll() {
183193
function testExecuteInteractive() {
184194
$this->Task->connection = 'test_suite';
185195
$this->Task->path = '/my/path/';
186-
196+
187197
$this->Task->setReturnValue('in', 'y');
188198
$this->Task->Model->setReturnValue('getName', 'Article');
189199
$this->Task->Model->setReturnValue('getTable', 'articles', array('Article'));
@@ -192,6 +202,7 @@ function testExecuteInteractive() {
192202
$this->Task->expectAt(0, 'createFile', array($filename, new PatternExpectation('/class ArticleFixture/')));
193203
$this->Task->execute();
194204
}
205+
195206
/**
196207
* Test that bake works
197208
*
@@ -225,6 +236,7 @@ function testBake() {
225236
$this->assertNoPattern('/var \$fields/', $result);
226237
$this->assertNoPattern('/var \$records/', $result);
227238
}
239+
228240
/**
229241
* Test that file generation includes headers and correct path for plugins.
230242
*
@@ -241,6 +253,7 @@ function testGenerateFixtureFile() {
241253
$this->Task->expectAt(1, 'createFile', array($filename, new PatternExpectation('/\<\?php(.*)\?\>/ms')));
242254
$result = $this->Task->generateFixtureFile('Article', array());
243255
}
256+
244257
/**
245258
* test generating files into plugins.
246259
*

0 commit comments

Comments
 (0)