Ceeram
2f5f1b28bc
Merge branch '2.2-validatorrules' into 2.2
2012-06-20 15:01:26 +02:00
Ceeram
60c611fa47
Parse rules in getField()
2012-06-20 14:54:32 +02:00
Jose Lorenzo Rodriguez
03d31b57f7
Merge remote-tracking branch 'origin/2.1' into 2.2
2012-06-19 19:28:20 -04:30
Ceeram
cd209ce099
Avoid using LC_ALL, on some installs this would cause error:
...
"setlocale(): Specified locale name is too long"
2012-06-19 23:20:08 +02:00
Ceeram
03e2263b69
Merge branch '2.1' into 2.2
2012-06-19 18:35:36 +02:00
Ceeram
8b94d9e9e7
Only change locale for LC_NUMERIC instead of LC_ALL, on some installs this woudl cause an error:
...
"setlocale(): Specified locale name is too long"
2012-06-19 18:33:51 +02:00
AD7six
d5cf2765dd
remove referencers to fixtures that don't exist
2012-06-18 16:40:37 +02:00
Ceeram
0df1e90eed
show all validation errors when saving/validating Associated and primary model fails validation as well, fixes #2925
2012-06-18 14:20:53 +02:00
Kyle Robinson Young
54745aada9
Fix custom validation methods with CakeValidationSet
2012-06-11 23:28:45 -07:00
Jose Lorenzo Rodriguez
5ba5f906e6
Adding new test case for ModelValidator
2012-06-09 15:27:22 -04:30
Jose Lorenzo Rodriguez
51635c2ca6
Merge remote-tracking branch 'origin/2.1' into 2.2
...
Conflicts:
lib/Cake/Model/Model.php
lib/Cake/Test/Case/Model/ModelValidationTest.php
2012-06-06 11:06:06 -04:30
Jose Lorenzo Rodriguez
111a23274e
Fixing yet another issue related to beforeValidate and
...
validateAssociated
2012-06-06 10:07:01 -04:30
mark_story
fceb028499
Fix code style errors.
2012-06-03 21:11:34 -04:00
Ceeram
4c6453501e
Merge branch '2.1' into 2.2
2012-06-02 01:47:21 +02:00
Jelle Henkens
e5eb7b490e
Preventing cache collisions by adding the the datasource key
2012-06-01 10:42:26 +01:00
Jelle Henkens
18b335a605
Replacing crc32 with md5 for less collisions in method caching
2012-06-01 10:42:26 +01:00
mark_story
9a8ceaeba6
Merge branch '2.1' into 2.2
...
Conflicts:
lib/Cake/Test/Case/View/XmlViewTest.php
2012-05-30 21:20:56 -04:00
Tigran Gabrielyan
1367e5b927
Fixed failing test case
2012-05-30 15:26:59 -07:00
mark_story
0bfcd49249
Fix unbindTranslation not unbinding.
...
There were documented use cases that have never worked. Fix that.
Also rename a method so it better describes what it does.
Fixes #2913
2012-05-27 21:25:55 -04:00
Majna
364c293e16
Add test for belongsTo and hasOne optimization.
2012-05-27 23:16:20 +02:00
mark_story
1c0f97ea67
Fix some minor code style issues.
2012-05-27 14:20:19 -04:00
mark_story
4b8c469004
Merge branch '2.1' into 2.2
...
Conflicts:
lib/Cake/VERSION.txt
2012-05-26 21:11:36 -04:00
mark_story
b27a3aab7b
Set session.gc_maxlifetime by default.
...
In the default case of using files for sessions, files could
be garbage collected earlier than expected based on other session
settings. Always set session.gc_maxlifetime so session files are
garbage collected correctly.
Fixes #2901
2012-05-23 22:25:19 -04:00
mark_story
ea9eee4c77
Fix array arguments being translated.
...
Fixes #2902
2012-05-23 21:02:41 -04:00
Jelle Henkens
f7ce5262b7
Updating mixed @param documentation to seperate list of accepted types
2012-05-21 21:55:10 +01:00
Jose Lorenzo Rodriguez
9cceb1553f
Improving ModelValidator::add() to allow multiple rules to be defined at once
2012-05-20 18:51:00 -04:30
mark_story
16a1a0ee79
Fix coding standards.
2012-05-20 15:51:09 -04:00
Jose Lorenzo Rodriguez
2ad406ab64
Merge branch '2.2-validator' into 2.2
...
Conflicts:
lib/Cake/Model/Model.php
lib/Cake/Test/Case/Model/ModelValidationTest.php
2012-05-20 14:27:35 -04:30
mark_story
ad31caeb0e
Merge branch '2.1' into 2.2
2012-05-20 14:53:41 -04:00
Jose Lorenzo Rodriguez
dc8c731ccb
Fixed failing test case
2012-05-19 19:59:32 -04:30
Jose Lorenzo Rodriguez
b22c50d8b6
Merge branch '2.1' into 2.2-validator
...
Conflicts:
lib/Cake/Model/Model.php
lib/Cake/Test/Case/Model/ModelValidationTest.php
lib/Cake/Test/Case/Model/models.php
2012-05-19 15:39:44 -04:30
Ceeram
7dbd6bc3a2
make sure model data is moved to alias, even when first key in data is assoc model
...
add extra tests for saveAll and validate first
ensure db values dont get reset to default values
2012-05-19 14:41:16 -04:30
Jelle Henkens
97ebbc8e23
Fixing coding conventions
2012-05-19 16:08:40 +01:00
Jelle Henkens
110536d575
Fixing CakeSchema to test APP_DIR with different names than all lowercase
2012-05-15 21:41:11 +01:00
mark_story
a3a2655fd5
Fix whitespace errors.
2012-05-11 21:38:21 -04:00
Jose Lorenzo Rodriguez
217bf85537
Implemented new method isEmptyAllowed in CakeValidationRule
2012-05-10 23:13:45 -04:30
Jose Lorenzo Rodriguez
307197da9e
Merge branch '2.2' into 2.2-validator
...
Conflicts:
lib/Cake/Model/Model.php
lib/Cake/Test/Case/Model/ModelValidationTest.php
lib/Cake/Test/Case/Model/ModelWriteTest.php
2012-05-10 22:19:35 -04:30
Jose Lorenzo Rodriguez
280893155a
Renaming CakeRule to CakeValidationRule
2012-05-10 21:01:44 -04:30
Rachman Chavik
539fa3a131
fixing method signature in test models
2012-05-10 20:55:47 -04:30
Jose Lorenzo Rodriguez
7db2b97f87
Fixing error with validateMany and validateAssociated not saving values altered in beforeValidate callbacks
2012-05-10 20:55:47 -04:30
mark_story
7592eb94ac
Fix test cases with postgres.
...
Setting id values confuses postgres' sequences.
2012-05-10 20:55:46 -04:30
mark_story
d9bf3cf987
Fix additional issues with saveAll().
...
Fixes #2857
2012-05-10 20:55:46 -04:30
mark_story
d73bc6b867
Fix error in Sqlite tests.
2012-05-10 20:55:45 -04:30
mark_story
8334ebebed
Fix saving translate records with saveAll()
...
Also fixes issues saving translated data with validation
disabled. By enabling data backup in beforeSave() and beforeValidate()
the existing behavior is preserved, and the current issue is fixed.
Fixes #2857
2012-05-10 20:55:45 -04:30
Rachman Chavik
73c66e2df4
fixing method signature in test models
2012-05-10 19:47:10 +07:00
Jose Lorenzo Rodriguez
0fb025f6dc
Fixing error with validateMany and validateAssociated not saving values altered in beforeValidate callbacks
2012-05-09 23:51:27 -04:30
mark_story
597913aa5b
Fix test cases with postgres.
...
Setting id values confuses postgres' sequences.
2012-05-07 22:10:17 -04:00
mark_story
fbba3621b5
Fix additional issues with saveAll().
...
Fixes #2857
2012-05-07 21:36:28 -04:00
Jose Lorenzo Rodriguez
52c7b2383c
Added afterValidate callback to maintain consistency across all other callbacks in the model layer
2012-05-06 23:38:29 -04:30
mark_story
a1e06b9c8b
Fix error in Sqlite tests.
2012-05-06 23:39:02 -04:00
Jose Lorenzo Rodriguez
d4511af27b
Implemented add and remove in ModelValidator
2012-05-06 23:06:28 -04:30
Jose Lorenzo Rodriguez
a7222bccd6
Implemented removeRule in CakeValidationSet
2012-05-06 22:30:07 -04:30
mark_story
6c5255ac73
Fix saving translate records with saveAll()
...
Also fixes issues saving translated data with validation
disabled. By enabling data backup in beforeSave() and beforeValidate()
the existing behavior is preserved, and the current issue is fixed.
Fixes #2857
2012-05-06 22:48:15 -04:00
Jose Lorenzo Rodriguez
ff91a0909a
Implemented countable interface for CakeValidationSet
2012-05-06 01:07:13 -04:30
Jose Lorenzo Rodriguez
989a8b8398
Implementing IteratorAggregate for CakeValidationSet
2012-05-05 21:13:09 -04:30
Jose Lorenzo Rodriguez
6f16a66b83
Implmenting ArrayAcces in CakeValidationSet
2012-05-05 21:00:40 -04:30
Jose Lorenzo Rodriguez
877e6c0f66
Removing the need for first param in CakeRule constructor
2012-05-05 19:41:48 -04:30
Jose Lorenzo Rodriguez
3199b9029b
Implemented countable interface for ModelValidator
2012-05-05 17:46:09 -04:30
Jose Lorenzo Rodriguez
81c0c3d91d
Implementing IteratorAggregate interface for ModelValidator
2012-05-05 17:34:35 -04:30
Jose Lorenzo Rodriguez
d35f8e6b00
Implementing ArrayAccess in ModelValidator
2012-05-05 15:52:02 -04:30
Jose Lorenzo Rodriguez
b6c8a345e7
Renaming CakeField to CakeValidationSet
2012-05-05 13:44:12 -04:30
Jose Lorenzo Rodriguez
843d95bb77
Renaming some methods ands removing others
2012-05-05 13:34:14 -04:30
Jose Lorenzo Rodriguez
bf0f5ab118
Merge remote-tracking branch 'origin/2.1' into 2.2
2012-04-29 20:05:39 -04:30
Jose Lorenzo Rodriguez
72e8992c25
Improving test coverage for CakeRule
2012-04-29 19:56:24 -04:30
Jose Lorenzo Rodriguez
d348bf6807
Refactoring again CakeRule, making all tests pass
2012-04-29 18:11:51 -04:30
Jose Lorenzo Rodriguez
deedd7a3ce
Even more tests passing now, almost there
2012-04-29 02:40:08 -04:30
Jose Lorenzo Rodriguez
66a568be89
More tests passing now
2012-04-29 01:09:36 -04:30
Jose Lorenzo Rodriguez
8700f3c7a2
Fixed some validation tests
2012-04-29 01:06:24 -04:30
Jose Lorenzo Rodriguez
30761f9153
Removed more redundant lines in ModelValidation tests
2012-04-29 00:46:56 -04:30
Jose Lorenzo Rodriguez
18c26119f3
Removing redundant code, cleaning up some sentences
2012-04-29 00:39:43 -04:30
Jose Lorenzo Rodriguez
c31f87b7a1
Refactored getMethods, got rid of validationErrors property in ModelValidator, made validateAssociated and many tests
...
pass
2012-04-29 00:24:35 -04:30
Jose Lorenzo Rodriguez
573d292ffa
Fixed more refereces to old method
2012-04-28 20:12:20 -04:30
José Lorenzo Rodríguez
d80b1ef7f6
Merge pull request #630 from shama/patch-typos
...
Typos in Test Cases
2012-04-27 07:42:40 -07:00
Kyle Robinson Young
eb059d3fa6
Fix typos in test cases
2012-04-26 20:14:52 -07:00
Kyle Robinson Young
b8488b8dfe
Update 1.x @link in docblocks
2012-04-26 19:49:18 -07:00
mark_story
46bce1a00f
Merge branch '2.1' into 2.2
2012-04-26 22:27:44 -04:00
mark_story
6bb8b22cdb
Fix space indented code.
2012-04-26 22:27:34 -04:00
Juan Basso
333ea29805
Renamed variable name from nested transaction
2012-04-26 20:58:25 -04:00
Juan Basso
37537faac0
Renamed method to check if the driver supports nested transaction.
2012-04-26 20:58:25 -04:00
Ceeram
ec9966ec6b
Adding tests for Validator
2012-04-25 09:38:58 +02:00
Thomas Ploch
324684c14f
Moving all validation logic into a new ModelValidator object.
2012-04-25 08:53:31 +02:00
Juan Basso
10a4b87979
Fixed tests with nested transaction in DboSource.
2012-04-24 22:28:47 -04:00
Juan Basso
5f722cb3d4
Update nested transaction test to use InnoDB table in MySQL.
2012-04-24 21:42:32 -04:00
Ceeram
0785ace172
fix error caused by non-existent fixture
2012-04-24 14:01:59 +02:00
Ceeram
74ee75b0ef
Merge branch '2.1' into 2.2
2012-04-23 10:34:04 +02:00
Juan Basso
7fe333ce4e
Merge branch '2.2-nested-transaction' into 2.2
2012-04-22 23:04:32 -04:00
ADmad
b1e7164d1a
Implemented translation of validation rule arguments in validation error messages. Closes #2816
2012-04-22 23:25:07 +05:30
Ceeram
f0bd7386e2
created, modified and updated fields now use static timestamp in testcases
2012-04-21 17:38:49 +02:00
euromark
bc2cd00123
cake 2.2 test case fixes (assert corrections, correct class names)
2012-04-21 15:02:35 +02:00
mark_story
2480ee1beb
Fix coding standards.
2012-04-20 20:52:10 -04:00
mark_story
21ba5bf04a
Merge branch '2.1' into 2.2
2012-04-17 21:47:24 -04:00
mark_story
ca2c122c62
Make flaky tests less flaky.
...
Off by one second errors are common here.
2012-04-17 20:51:52 -04:00
Ceeram
388b20dd9d
fix error in previous commit
2012-04-17 00:22:13 +02:00
Ceeram
a84597784d
avoid warning when saveAll() data has empty hasMany data, fixes #2792
2012-04-16 22:46:58 +02:00
mark_story
72c3059d94
Add missing parent calls.
...
Fixes piles of failing tests.
2012-04-15 22:20:34 -04:00
Juan Basso
37157806b9
Removing some dup code in nested transaction tests.
2012-04-14 16:46:47 -04:00
Juan Basso
7be5349b0c
Added configuration to disable nested transaction, even if the db supports it.
2012-04-14 16:43:24 -04:00
Juan Basso
b0a3a1a5aa
Added test to check when driver do not support nested support.
2012-04-14 16:25:23 -04:00
Juan Basso
79f7ca7d33
Oops, forgot one change in last commit.
2012-04-14 16:23:51 -04:00
Juan Basso
a512d46679
Sqlite is failing in PHP 5.2, re-adding the check for driver support.
2012-04-14 16:23:51 -04:00