Skip to content
Permalink
Browse files

Fix coding standards.

  • Loading branch information...
markstory committed May 20, 2012
1 parent 2ad406a commit 16a1a0ee7939b929724252dbaa91b1ded4f740b8
@@ -302,7 +302,7 @@ public function getMethods() {
public function getField($name = null) {
if ($name !== null && !empty($this->_fields[$name])) {
return $this->_fields[$name];
} elseif ($name !==null) {
} elseif ($name !== null) {
return null;
}
return $this->_fields;
@@ -206,7 +206,7 @@ public function skip() {
* @return boolean
*/
public function isLast() {
return (bool) $this->last;
return (bool)$this->last;
}
/**
@@ -269,7 +269,7 @@ public function process($field, &$data, &$methods) {
if (isset($methods[$rule])) {
$this->_ruleParams[] = array_merge($validator, $this->_passedOptions);
$this->_ruleParams[0] = array($field => $this->_ruleParams[0]);
$this->_valid = call_user_func_array($methods[$rule], $this->_ruleParams);
$this->_valid = call_user_func_array($methods[$rule], $this->_ruleParams);
} elseif (class_exists('Validation') && method_exists('Validation', $this->_rule)) {
$this->_valid = call_user_func_array(array('Validation', $this->_rule), $this->_ruleParams);
} elseif (is_string($validator['rule'])) {
@@ -34,8 +34,8 @@ class ModelTest extends PHPUnit_Framework_TestSuite {
public static function suite() {
$suite = new PHPUnit_Framework_TestSuite('All Model related class tests');
$suite->addTestFile(CORE_TEST_CASES . DS . 'Model' . DS . 'Validator' . DS .'CakeValidationSetTest.php');
$suite->addTestFile(CORE_TEST_CASES . DS . 'Model' . DS . 'Validator' . DS .'CakeValidationRuleTest.php');
$suite->addTestFile(CORE_TEST_CASES . DS . 'Model' . DS . 'Validator' . DS . 'CakeValidationSetTest.php');
$suite->addTestFile(CORE_TEST_CASES . DS . 'Model' . DS . 'Validator' . DS . 'CakeValidationRuleTest.php');
$suite->addTestFile(CORE_TEST_CASES . DS . 'Model' . DS . 'ModelReadTest.php');
$suite->addTestFile(CORE_TEST_CASES . DS . 'Model' . DS . 'ModelWriteTest.php');
$suite->addTestFile(CORE_TEST_CASES . DS . 'Model' . DS . 'ModelDeleteTest.php');
@@ -1090,8 +1090,8 @@ public function testSaveAllDeepValidateOnly() {
$expected = array(
'Article' => true,
'Comment' => array(
true,
true
true,
true
)
);
$result = $TestModel->saveAll($data, array('validate' => 'only', 'atomic' => false, 'deep' => true));
@@ -1109,8 +1109,8 @@ public function testSaveAllDeepValidateOnly() {
$expected = array(
'Article' => true,
'Comment' => array(
false,
true
false,
true
)
);
$result = $TestModel->saveAll($data, array('validate' => 'only', 'atomic' => false, 'deep' => true));
@@ -1152,8 +1152,8 @@ public function testSaveAllDeepValidateOnly() {
$expected = array(
'Article' => true,
'Comment' => array(
true,
true
true,
true
)
);
$result = $TestModel->saveAll($data, array('validate' => 'only', 'atomic' => false, 'deep' => true));
@@ -1171,8 +1171,8 @@ public function testSaveAllDeepValidateOnly() {
$expected = array(
'Article' => true,
'Comment' => array(
true,
false
true,
false
)
);
$result = $TestModel->saveAll($data, array('validate' => 'only', 'atomic' => false, 'deep' => true));
@@ -1394,8 +1394,8 @@ public function testSaveAllNotDeepValidateOnly() {
$expected = array(
'Article' => true,
'Comment' => array(
true,
true
true,
true
)
);
$result = $TestModel->saveAll($data, array('validate' => 'only', 'atomic' => false, 'deep' => false));
@@ -1425,8 +1425,8 @@ public function testSaveAllNotDeepValidateOnly() {
$expected = array(
'Article' => true,
'Comment' => array(
true,
true
true,
true
)
);
$result = $TestModel->saveAll($data, array('validate' => 'only', 'atomic' => false, 'deep' => false));
@@ -26,15 +26,6 @@
*/
class CakeValidationRuleTest extends CakeTestCase {
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
}
/**
* Auxiliary method to test custom validators
*

0 comments on commit 16a1a0e

Please sign in to comment.
You can’t perform that action at this time.