Permalink
Browse files

fix coding standards

  • Loading branch information...
1 parent 83de70e commit 89100f947682ae0cdbc383a3dfbd152c5da884d5 @ceeram ceeram committed Mar 18, 2013
@@ -437,7 +437,7 @@ public function insertCallback($table, $fields, $values) {
$this->insertMulti['fields'] = $fields;
$this->insertMulti['values'] = $values;
$this->insertMulti['fields_values'] = array();
- foreach($values as $record) {
+ foreach ($values as $record) {
$this->insertMulti['fields_values'][] = array_combine($fields, $record);
}
return true;
@@ -467,18 +467,18 @@ public function testInsertStrings() {
$this->assertEquals($expected, $this->insertMulti['values']);
$expected = array(
array(
- 'name' => 'Mark Doe',
- 'email' => 'mark.doe@email.com',
+ 'name' => 'Mark Doe',
+ 'email' => 'mark.doe@email.com',
'age' => null
),
array(
- 'name' => 'John Doe',
- 'email' => 'john.doe@email.com',
+ 'name' => 'John Doe',
+ 'email' => 'john.doe@email.com',
'age' => 20
),
array(
- 'name' => 'Jane Doe',
- 'email' => 'jane.doe@email.com',
+ 'name' => 'Jane Doe',
+ 'email' => 'jane.doe@email.com',
'age' => 30
),
);
@@ -1,38 +1,58 @@
<?php
+/**
+ * CakeTestSuiteDispatcherTest file
+ *
+ * Test Case for CakeTestSuiteDispatcher class
+ *
+ * PHP version 5
+ *
+ * CakePHP : Rapid Development Framework (http://cakephp.org)
+ * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * For full copyright and license information, please see the LICENSE.txt
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link http://cakephp.org CakePHP Project
+ * @package Cake.Test.Case.TestSuite
+ * @since CakePHP v 2.3.2
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+ */
class CakeTestSuiteDispatcherTest extends CakeTestCase {
- public function setUp() {
- $this->vendors = App::path('vendors');
- $this->includePath = ini_get('include_path');
- }
+ public function setUp() {
+ $this->vendors = App::path('vendors');
+ $this->includePath = ini_get('include_path');
+ }
- public function tearDown() {
- App::build(array('Vendor' => $this->vendors), App::RESET);
- ini_set('include_path', $this->includePath);
- }
+ public function tearDown() {
+ App::build(array('Vendor' => $this->vendors), App::RESET);
+ ini_set('include_path', $this->includePath);
+ }
- protected function clearPaths() {
- App::build(array('Vendor' => array('junk')), App::RESET);
- ini_set('include_path', 'junk');
- }
+ protected function clearPaths() {
+ App::build(array('Vendor' => array('junk')), App::RESET);
+ ini_set('include_path', 'junk');
+ }
- public function testLoadTestFramework() {
- $dispatcher = new CakeTestSuiteDispatcher();
+ public function testLoadTestFramework() {
+ $dispatcher = new CakeTestSuiteDispatcher();
- $this->assertTrue($dispatcher->loadTestFramework());
+ $this->assertTrue($dispatcher->loadTestFramework());
- $this->clearPaths();
+ $this->clearPaths();
- $exception = null;
+ $exception = null;
- try {
- $dispatcher->loadTestFramework();
- } catch (Exception $ex) {
- $exception = $ex;
- }
+ try {
+ $dispatcher->loadTestFramework();
+ } catch (Exception $ex) {
+ $exception = $ex;
+ }
- $this->assertEquals(get_class($exception), "PHPUnit_Framework_Error_Warning");
- }
+ $this->assertEquals(get_class($exception), "PHPUnit_Framework_Error_Warning");
+ }
-}
+}
@@ -138,14 +138,14 @@ protected function _checkPHPUnit() {
*/
public function loadTestFramework() {
foreach (App::path('vendors') as $vendor) {
- $vendor = rtrim($vendor, DS);
+ $vendor = rtrim($vendor, DS);
if (is_dir($vendor . DS . 'PHPUnit')) {
ini_set('include_path', $vendor . PATH_SEPARATOR . ini_get('include_path'));
break;
}
}
- return (include('PHPUnit' . DS . 'Autoload.php')) !== false;
+ return (include ('PHPUnit' . DS . 'Autoload.php')) !== false;
}
/**

0 comments on commit 89100f9

Please sign in to comment.