Commit graph

341 commits

Author SHA1 Message Date
Ceeram
c9528b8446 Merge branch '2.1' into 2.2 2012-03-21 11:19:08 +01:00
Ceeram
0a94202fb6 fixing test of previous commit 2012-03-21 11:07:51 +01:00
Ceeram
4dfbfe9c8b fix saveAll deep option, when associated data is empty, or has deeper associated model data as first key in array 2012-03-21 10:38:04 +01:00
Ceeram
247f5522c6 add test for saveAll deep 2012-03-20 20:41:41 +01:00
Thomas Ploch
8ad65366dc Fixed ModelWrite test. Removed undefined method calls to assertCount(). 2012-03-20 15:06:26 +01:00
Ceeram
091ad53b80 ensure boolean values are converted to correct value on update, avoiding issues with posgres boolean type 2012-03-19 13:27:26 +01:00
mark_story
c58b61c17b Merge branch '2.1' into 2.2
Conflicts:
	lib/Cake/Test/Case/Model/ModelWriteTest.php
2012-03-18 21:26:45 -04:00
mark_story
dbb2dd44d7 Fix more coding standards. 2012-03-18 21:20:33 -04:00
Ceeram
4191e2e573 adding test to disprove ticket, closes #2691 2012-03-19 01:27:35 +01:00
mark_story
480c1bbb54 Fix coding standards. 2012-03-18 18:06:10 -04:00
mark_story
fc234d82f1 Fix coding standards in Case/Model/Behavior. 2012-03-18 14:31:13 -04:00
mark_story
346e048371 Fix coding standards in Datasource tests. 2012-03-18 13:08:27 -04:00
mark_story
6f8e7f1bc5 Revert "Fix coding standards errors."
This reverts commit 3362100512.
2012-03-18 12:29:39 -04:00
mark_story
3362100512 Fix coding standards errors. 2012-03-18 12:20:24 -04:00
ADmad
bdddc85946 Making option 'unique' => 'keepExisting' for HABTM association behave consistently with all acceptable data formats. 2012-03-18 13:43:21 +05:30
Ceeram
3e0294a695 Several fixes for testcases.
- Ensure correct ordering of find results
- avoid fatal error when testing email transport classes on 5.2
- add skips when running cross db join tests and multiple sqlite configs are defined
2012-03-15 01:31:28 +01:00
Ceeram
9f9c6fdd67 ensure correct order in results as postgres does not always return in same order 2012-03-15 01:31:09 +01:00
Ceeram
40f4f54b34 Several fixes for testcases.
- Ensure correct ordering of find results
- avoid fatal error when testing email transport classes on 5.2
- add skips when running cross db join tests and multiple sqlite configs are defined
2012-03-14 15:08:46 +01:00
Ceeram
b871095125 ensure correct order in results as postgres does not always return in same order 2012-03-14 01:12:35 +01:00
dogmatic69
2ad0f8b8db setting defaults in the DBO so you do not need to pass every field possible to avoid errors. also adds a test for calling with some missing fields. fixes #1779 2012-03-13 17:40:25 +00:00
Juan Basso
c754fb2dcb Updated copyright to 2012. 2012-03-12 22:46:46 -04:00
Juan Basso
3b1bd90ad6 Updated copyright to 2012. 2012-03-12 22:46:07 -04:00
Ceeram
a2fb4178fb Testcase added, refs #2672 2012-03-12 20:24:53 -04:00
mark_story
83a29f054e Fix Session.cookieTimeout default behavior.
When Session.cookieTimeout is undefined, it should
reflect the value set for 'timeout' and not default to 240.

Fixes #2669
2012-03-11 08:14:54 -04:00
Ceeram
2a7bee0a5c make sure locale is restored correct in tests 2012-03-04 00:36:21 +01:00
Ceeram
08a4d0bf63 Avoid unsetting Model's $findMethods when defining a custom find method in AppModel, also add tests for custom finds 2012-03-03 23:55:03 +01:00
Renan Gonçalves
3412c0cb0f Removing ReflectionMethod::setAccessible() from tests, it was limiting to PHP 5.3.2 or newer. 2012-03-02 15:59:59 +01:00
mark_story
2665178ec9 Merge branch '2.0' into 2.1 2012-02-28 07:04:20 -05:00
Norio Suzuki
757579e1d1 Fixed a testcase, support PostgreSQL 9.1
Signed-off-by: mark_story <mark@mark-story.com>
2012-02-28 06:32:31 -05:00
mark_story
7665f369fa Merge branch '2.1-type-hinting-corrections' into 2.1 2012-02-25 20:07:18 -05:00
mark_story
e958e6c25f Fix strict and warning errors from type hints. 2012-02-25 20:06:48 -05:00
euromark
973dce916a php5 corrections 2012-02-25 19:46:07 -05:00
euromark
45112088a1 type hinting models 2012-02-25 19:46:06 -05:00
euromark
38c3e30a1e visibility attributes 2012-02-25 19:46:06 -05:00
euromark
e94d307ee1 code conventions 2012-02-25 19:46:05 -05:00
ADmad
4edb378ef8 Added ability to pass ID as parameter to Model::exists() 2012-02-24 19:42:23 +05:30
Mark Story
fd927207c1 Merge pull request #524 from shama/patch-typos
Typo fixes in the tests
2012-02-23 17:11:08 -08:00
Kyle Robinson Young
4176e59e52 Typo fixes in tests 2012-02-23 15:29:53 -08:00
Kyle Robinson Young
ea652394c7 Move DbAcl and IniAcl into Acl subfolder and rename Model/DbAclTest to AclNodeTest 2012-02-23 10:45:32 -08:00
Mark Story
b7302850b5 Merge pull request #467 from tPl0ch/2.1-required-update-create
Added support for simplified required validation on 'create' or 'update'. Fixes #230.
2012-02-22 09:43:13 -08:00
José Lorenzo Rodríguez
74d837bef3 Merge pull request #512 from shama/patch-test-fixes
Fix missing class errors with ComponentCollectionTest and DbAclTest
2012-02-22 03:48:40 -08:00
Mark Story
cee8f2cebb Merge pull request #508 from shama/patch-app-build
Updates to App::build() uses
2012-02-21 19:48:21 -08:00
Kyle Robinson Young
962fe7c571 Fix missing class errors 2012-02-18 06:32:48 -08:00
Mark Story
c2d753ffb4 Merge pull request #500 from shama/patch-visibility
Add missing visibility keywords
2012-02-21 17:36:36 -08:00
Mark Story
540f6669fd Merge pull request #498 from shama/patch-loadFixtures
Remove unnecessary loadFixtures() calls
2012-02-21 17:28:52 -08:00
Mark Story
d7026204d5 Merge pull request #497 from shama/patch-crossSchemaTest
Cleaning up ModelCrossSchemaHabtm test case
2012-02-21 17:27:01 -08:00
Kyle Robinson Young
32e7943b00 Fix merge conflict with 62f8dea 2012-02-18 04:39:32 -08:00
Kyle Robinson Young
22582aee63 Upgrade legacy uses of App::build() types 2012-02-18 04:31:29 -08:00
Kyle Robinson Young
c4829dc3b8 Use App::RESET instead of true with App::build() 2012-02-18 04:04:54 -08:00
Kyle Robinson Young
45ec5d73c5 Add missing visibility keywords 2012-02-16 23:13:12 -08:00
Kyle Robinson Young
75882507bc Remove unnecessary loadFixtures() calls 2012-02-16 22:37:18 -08:00
Kyle Robinson Young
95b8675637 Cleaning up ModelCrossSchemaHabtm test case 2012-02-16 22:25:53 -08:00
Kyle Robinson Young
4141a3ab5b Load specific test plugins rather than all to avoid conflicts 2012-02-16 20:03:44 -08:00
Majna
d41e5621b7 Fix missing and invalid assertions in tests.
Remove unused variables and dead code.
2012-02-16 19:28:21 +01:00
Jose Lorenzo Rodriguez
4cfc033387 Fixing failing test cases 2012-02-13 00:26:10 -04:30
Ceeram
bc07ba3839 Added option['deep'] to saveAll, to save unlimited levels associated data
Squashed commit of the following:

commit 45caa54e3b25bc94ee10d7b3700ff334e7994257
Author: Ceeram <c33ram@gmail.com>
Date:   Sun Feb 12 22:29:33 2012 +0100

    update docblocks for deep save

commit 6f3c3b9abf12e394262b0a233188a52095f64b50
Merge: 1d32698 1dd0ff1
Author: Ceeram <c33ram@gmail.com>
Date:   Sun Feb 12 18:17:34 2012 +0100

    Merge branch '2.1' into 2.1-saveAllTheThings

commit 1d32698640fa1a3c1d606eeaf4740637ff8a1991
Author: Ceeram <c33ram@gmail.com>
Date:   Sun Feb 12 18:16:57 2012 +0100

    Revert "adding info in docblock about associated model fieldList"

    This reverts commit 7cc10a2b5afc1007c388a6da449781dc351d50cd.

commit 7cc10a2b5afc1007c388a6da449781dc351d50cd
Author: Ceeram <c33ram@gmail.com>
Date:   Sun Feb 12 18:05:18 2012 +0100

    adding info in docblock about associated model fieldList

commit db2ad2759f6af460715a8bbee167262bcbb62d77
Author: Ceeram <c33ram@gmail.com>
Date:   Sun Feb 12 17:51:44 2012 +0100

    add tests for deep saveAll respecting fieldList option

commit 14123fccfc43fac1b4cddeea8350dca8fb9c9821
Merge: cfdf25d 2afb05b
Author: Ceeram <c33ram@gmail.com>
Date:   Sun Feb 12 16:51:26 2012 +0100

    Merge branch '2.1' into 2.1-saveAllTheThings

commit cfdf25d4b587c6f1a8cd6ec2bc46dc21fa3c6704
Author: Ceeram <c33ram@gmail.com>
Date:   Tue Feb 7 13:54:59 2012 +0100

    Make saveAllTheThings fully BC, use $options['deep'] = true, to save infinite recursive data

commit 6e8c4380c37a31efc2a37a5ab6438db26d293eb3
Merge: 203c7e1 95aa7e3
Author: Ceeram <c33ram@gmail.com>
Date:   Wed Jan 25 14:22:26 2012 +0100

    Merge branch '2.1' into 2.1-saveAllTheThings

commit 203c7e1d9870e282ec7098297d47e49132904401
Author: Ceeram <c33ram@gmail.com>
Date:   Wed Jan 25 14:19:25 2012 +0100

    validate all the things as well

commit d920d0000fcab80fc48a29b45dbba147a2eed27c
Merge: d648f6a 4f1be12
Author: Ceeram <c33ram@gmail.com>
Date:   Mon Jan 23 18:22:12 2012 +0100

    Merge branch '2.1' into 2.1-saveAllTheThings

commit d648f6a90419e0fa27ed1d9e9feb51c37fbf0397
Author: Ceeram <c33ram@gmail.com>
Date:   Fri Dec 9 15:11:52 2011 +0100

    making saveAll, saveMany and saveAssociated not limited to only save directly related models
2012-02-13 01:00:28 +01:00
mark_story
2afb05b590 Merge branch '2.0' into 2.1
Conflicts:
	app/View/Pages/home.ctp
	lib/Cake/Config/config.php
	lib/Cake/Core/App.php
	lib/Cake/VERSION.txt
	lib/Cake/View/Helper/NumberHelper.php
2012-02-12 10:06:13 -05:00
Mark Story
6502ab8f39 Merge pull request #473 from majna/2.1-cache-clear
Fix Cache::clear() calls in tests.
2012-02-10 15:56:21 -08:00
Ceeram
1f0af2a138 Adding order on created to the find, avoid failing test by incorrect order in postgres 2012-02-10 23:51:41 +01:00
Majna
42cbb8cafe Fix Cache::clear() calls in tests. 2012-02-10 20:38:41 +01:00
Ceeram
028ba27522 Merge branch '2.1' of github.com:cakephp/cakephp into 2.1 2012-02-10 17:26:16 +01:00
Ceeram
97f48dcdb3 fix failing test, caused by postgres ordering 2012-02-10 17:26:05 +01:00
mark_story
0cfec525b2 Allow SqlServer to execute procs correctly.
Both SELECT and EXECUTE statements should go through
the parent method as they could fetch results.

Fixes #2558
2012-02-09 22:27:30 -05:00
Yasushi Ichikawa
e8a9d93eb5 Add params option to logQuery()
Parameters for prepared statements are now part of the
logged query data.
2012-02-08 20:15:40 -05:00
Thomas Ploch
4f3b266491 Added support for simplified required validation on 'create' or 'update'. Added testcases for new 'required' attributes and conflicts with the 'on' key. Fixes #230. 2012-02-07 12:15:04 +01:00
ADmad
610213dd6c Added test for deleting dependent hasMany associated records. Refs #2553 2012-02-07 01:12:14 +05:30
Scott Harwell
dddcdd105e Added test case for fix in e1738c8c 2012-02-05 13:37:54 -05:00
mark_story
d904ab00fa Merge branch '2.0' into 2.1 2012-01-27 20:58:24 -05:00
Ceeram
fb3c3e4df8 fix correct node lookup when authorize object uses plugin userModel setting, fixes #2464 2012-01-27 00:16:22 +01:00
Ceeram
7eda0affe3 Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/View/ThemeView.php
2012-01-26 21:40:18 +01:00
mark_story
dbece1f157 Add test for saveField() + foreign key.
Closes #2507
2012-01-24 20:32:48 -05:00
mark_story
b8e27c7588 Fix indentation. 2012-01-24 20:32:06 -05:00
Jose Lorenzo Rodriguez
b9ad469a65 Merge remote-tracking branch 'origin/2.0' into 2.1 2012-01-22 15:52:54 -04:30
Jose Lorenzo Rodriguez
37314a2188 Logging transaction commands in DboSource, fixes #2457 2012-01-21 15:48:17 -04:30
Jose Lorenzo Rodriguez
6aa08b5f52 Preventing datasource creationa and access on models having $useTable = false; 2012-01-21 14:03:11 -04:30
mark_story
df5d9ac3d1 Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Model/Model.php
	lib/Cake/Test/Case/Routing/RouterTest.php
2012-01-20 20:28:15 -05:00
Ceeram
d4e2fbf6b8 set correct default validate option, now matches saveAll/saveMany default value, fixes #2492 2012-01-20 11:02:13 +01:00
mark_story
a70c8c7ac3 Merge changes from 1.3 to 2.0
Merge changes from #GH284 from 1.3 to 2.0.
Model::validate() no longer does queries when its not
necessary.
2012-01-19 22:50:40 -05:00
Ceeram
2a9e6771c3 allow other parent field, set in find options or TreeHebavior, for threaded find. Fixes #1769 2012-01-19 23:26:43 +01:00
AD7six
7b640b8123 move find threaded logic to the set class 2012-01-10 00:24:38 +01:00
mark_story
0e56d742b8 Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Model/BehaviorCollection.php
	lib/Cake/basics.php
2012-01-08 21:59:18 -05:00
mark_story
c548b6b88a Fix issue with find(count) and translated conditions.
Because count queries did not have joins created for the translated
fields pagination would generate invalid queries. Checking the conditions
for translated fields and adding in the correct joins solves that.
Extract what would have been duplicated code into methods.

Add a few protected properties to keep method signatures sane. The code
could be even simpler if the existing find(count) join was removed.

Fixes #2349
2012-01-08 20:40:25 -05:00
mark_story
9a67a70703 Fix failing test. 2012-01-07 20:24:33 -05:00
mark_story
beced84d2d Fix illegal offset caused by TranslateBehavior.
If you load TranslateBehavior at runtime in a disabled state, the enabled
flag would be interpreted as an association and cause errors.

Fixes #2443
2012-01-07 11:58:35 -05:00
Jose Lorenzo Rodriguez
1991430584 Removing test that does not relate anymore to SqlServer datasource 2012-01-07 02:17:27 -04:30
Jose Lorenzo Rodriguez
0c6271dd5d Fixing a few SqlServer failing tests 2012-01-07 02:14:07 -04:30
mark_story
9562638610 Merge branch '2.0' into 2.1 2012-01-04 07:39:35 -05:00
mark_story
c43b099894 Fix null bytea columns.
Apply patch from 'opiazer'  Fixes #2432
2012-01-03 20:51:56 -05:00
mark_story
b4faa00703 Adding error to find(threaded).
When the model has no parent_id trigger a warning about the impending
failure and return an empty result.

Fixes #2341
2012-01-02 13:46:35 -05:00
mark_story
83987bee17 Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Network/CakeRequest.php
2012-01-01 21:15:27 -05:00
mark_story
b5f918765e Adding docs + exceptions for name translation.
Closes #2367
2011-12-30 20:39:04 -05:00
mark_story
23178df504 Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Config/config.php
	lib/Cake/VERSION.txt
	lib/Cake/View/Helper/FormHelper.php
2011-12-29 20:03:42 -05:00
Rachman Chavik
b1aae5b5ab add fullTableName tests with empty schemaName 2011-12-29 19:17:06 +07:00
Mark Story
2cc38b5ba7 Fix failing test in PHP5.4 2011-12-27 19:40:51 -05:00
Jose Lorenzo Rodriguez
1651257919 Migrating all model callbacks to the CakeEventManager, fixing some minor bugs. All tests passing again 2011-12-26 13:06:48 -04:30
mark_story
d8bc13f996 Fix incorrect time handling in deconstruct()
Apply patch from 'Amit Badkas' to solve issues where invalid times
were treated as valid.
Re-structure tests to use a dataprovider instead of copy + paste.

Fixes #2412
2011-12-26 10:03:14 -05:00
ADmad
e4cc18c0e7 Changing test case to make it pass on Sqlite 2011-12-24 01:18:07 +05:30
ADmad
053ebf211e More test case fixing 2011-12-24 01:04:38 +05:30
ADmad
f24c01c1f4 Fixed failing test cases. 2011-12-24 00:59:51 +05:30
ADmad
ba27c8c201 Added multi-model fieldList support 2011-12-23 02:07:48 +05:30