Skip to content

Commit 89100f9

Browse files
committed
fix coding standards
1 parent 83de70e commit 89100f9

File tree

3 files changed

+54
-34
lines changed

3 files changed

+54
-34
lines changed

lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ public function insertCallback($table, $fields, $values) {
437437
$this->insertMulti['fields'] = $fields;
438438
$this->insertMulti['values'] = $values;
439439
$this->insertMulti['fields_values'] = array();
440-
foreach($values as $record) {
440+
foreach ($values as $record) {
441441
$this->insertMulti['fields_values'][] = array_combine($fields, $record);
442442
}
443443
return true;
@@ -467,18 +467,18 @@ public function testInsertStrings() {
467467
$this->assertEquals($expected, $this->insertMulti['values']);
468468
$expected = array(
469469
array(
470-
'name' => 'Mark Doe',
471-
'email' => 'mark.doe@email.com',
470+
'name' => 'Mark Doe',
471+
'email' => 'mark.doe@email.com',
472472
'age' => null
473473
),
474474
array(
475-
'name' => 'John Doe',
476-
'email' => 'john.doe@email.com',
475+
'name' => 'John Doe',
476+
'email' => 'john.doe@email.com',
477477
'age' => 20
478478
),
479479
array(
480-
'name' => 'Jane Doe',
481-
'email' => 'jane.doe@email.com',
480+
'name' => 'Jane Doe',
481+
'email' => 'jane.doe@email.com',
482482
'age' => 30
483483
),
484484
);
Lines changed: 45 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,58 @@
11
<?php
2+
/**
3+
* CakeTestSuiteDispatcherTest file
4+
*
5+
* Test Case for CakeTestSuiteDispatcher class
6+
*
7+
* PHP version 5
8+
*
9+
* CakePHP : Rapid Development Framework (http://cakephp.org)
10+
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
11+
*
12+
* Licensed under The MIT License
13+
* For full copyright and license information, please see the LICENSE.txt
14+
* Redistributions of files must retain the above copyright notice.
15+
*
16+
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
17+
* @link http://cakephp.org CakePHP Project
18+
* @package Cake.Test.Case.TestSuite
19+
* @since CakePHP v 2.3.2
20+
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
21+
*/
222

323
class CakeTestSuiteDispatcherTest extends CakeTestCase {
424

5-
public function setUp() {
6-
$this->vendors = App::path('vendors');
7-
$this->includePath = ini_get('include_path');
8-
}
25+
public function setUp() {
26+
$this->vendors = App::path('vendors');
27+
$this->includePath = ini_get('include_path');
28+
}
929

10-
public function tearDown() {
11-
App::build(array('Vendor' => $this->vendors), App::RESET);
12-
ini_set('include_path', $this->includePath);
13-
}
30+
public function tearDown() {
31+
App::build(array('Vendor' => $this->vendors), App::RESET);
32+
ini_set('include_path', $this->includePath);
33+
}
1434

15-
protected function clearPaths() {
16-
App::build(array('Vendor' => array('junk')), App::RESET);
17-
ini_set('include_path', 'junk');
18-
}
35+
protected function clearPaths() {
36+
App::build(array('Vendor' => array('junk')), App::RESET);
37+
ini_set('include_path', 'junk');
38+
}
1939

20-
public function testLoadTestFramework() {
21-
$dispatcher = new CakeTestSuiteDispatcher();
40+
public function testLoadTestFramework() {
41+
$dispatcher = new CakeTestSuiteDispatcher();
2242

23-
$this->assertTrue($dispatcher->loadTestFramework());
43+
$this->assertTrue($dispatcher->loadTestFramework());
2444

25-
$this->clearPaths();
45+
$this->clearPaths();
2646

27-
$exception = null;
47+
$exception = null;
2848

29-
try {
30-
$dispatcher->loadTestFramework();
31-
} catch (Exception $ex) {
32-
$exception = $ex;
33-
}
49+
try {
50+
$dispatcher->loadTestFramework();
51+
} catch (Exception $ex) {
52+
$exception = $ex;
53+
}
3454

35-
$this->assertEquals(get_class($exception), "PHPUnit_Framework_Error_Warning");
36-
}
55+
$this->assertEquals(get_class($exception), "PHPUnit_Framework_Error_Warning");
56+
}
3757

38-
}
58+
}

lib/Cake/TestSuite/CakeTestSuiteDispatcher.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,14 @@ protected function _checkPHPUnit() {
138138
*/
139139
public function loadTestFramework() {
140140
foreach (App::path('vendors') as $vendor) {
141-
$vendor = rtrim($vendor, DS);
141+
$vendor = rtrim($vendor, DS);
142142
if (is_dir($vendor . DS . 'PHPUnit')) {
143143
ini_set('include_path', $vendor . PATH_SEPARATOR . ini_get('include_path'));
144144
break;
145145
}
146146
}
147147

148-
return (include('PHPUnit' . DS . 'Autoload.php')) !== false;
148+
return (include ('PHPUnit' . DS . 'Autoload.php')) !== false;
149149
}
150150

151151
/**

0 commit comments

Comments
 (0)