jperras
9d7b560817
Splitting model tests into separate files to allow more fine-grained test running.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8255 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-07-24 22:17:14 +00:00
nate
a75d1fad2a
Modifying quoting method used in conditions with array values in DboSource, fixes #6519
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8243 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-07-22 01:50:11 +00:00
mark_story
fb6b16c467
Fixing empty time value handling in Model::deconstruct(). Both null and 00:00:00 are valid values now. Test cases added and refactored. Fixes #6488 , #6018 , Refs #5659
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8225 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-07-08 03:25:30 +00:00
DarkAngelBGE
9918583e7e
Adding testcases to disprove #6111
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8224 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-07-06 22:38:37 +00:00
jperras
d2a6be21ef
Splitting Model test into several classes for ease of testing. Creating new 'Database' test group for schema, db_acl and datasource tests. Model group test now only encompasses model & behavior test cases.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8219 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-07-04 19:23:22 +00:00
gwoo
f2b7a26be8
fixes #5710 , HABTM - constraining unique ids, but removing non-unique
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8217 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-07-03 03:31:05 +00:00
mark_story
45a51ed809
Changing return of Model::deleteAll(). When no records are matched by the delete conditions return is now (bool)true as no records matching those conditions exist.
...
Test case added.
Fixes #6453
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8216 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-07-03 00:26:58 +00:00
gwoo
92b8e87ed7
fix for cross database joins when recursive < 1
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8212 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-07-02 23:14:38 +00:00
mark_story
6a34c9ef31
Fixing Model::saveAll() PHP4 compatibility. Minor API change in __save(). __save() no longer takes a model instance as the first parameter. Because of Model implementation details in PHP4 this caused broken references. Fixes #6389 , #6223
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8204 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-06-27 15:25:07 +00:00
gwoo
88e0cfa2f8
fixes #6427 , default datasource not loaded when ds is specified
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8197 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-06-16 21:35:21 +00:00
jperras
6064019339
Refactoring model.test.php for 100 col display.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8192 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-06-10 03:00:38 +00:00
DarkAngelBGE
d9489b942b
Removing duplicate START TRANSACTION sql execution in mysqli environment, fixes #6422
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8191 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-06-06 15:41:33 +00:00
mark_story
2c1b7fc24e
Adding nullish value handling for date, datetime, and timestamp column types to DboPostgres. Empty string values now return instead of "". Fixes #6386
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8190 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-06-05 02:43:08 +00:00
mark_story
b055db19f7
Increasing Model test compatibility with SQLite and Postgres
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8188 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-06-04 00:37:27 +00:00
jperras
d2b4995e43
Updating Model::deconstruct to handle db expressions correctly. Fixes #6372 ; thanks to mattcurry for the patch.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8185 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-06-02 03:23:15 +00:00
mark_story
a9bbae31ee
Fixing primary key column length in DboSqlite. UUID primary keys now return defined length.
...
Test cases added for describe()
Fixes #6412
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8184 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-06-02 03:03:51 +00:00
mark_story
f0752feeec
Adding patch from 'burzum'. Fixes ambiguous field sql error when joining two trees with a defined scope.
...
Test cases and fixtures added.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8178 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-05-26 17:17:57 +00:00
mark_story
a44e69e47f
Adding test case to disprove #6387
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8176 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-05-22 02:00:21 +00:00
mark_story
029f422953
Adding patch from 'CSdread_' Adds test coverage to Model::getAssociated()
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8168 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-05-08 02:39:00 +00:00
renan.saddam
f25cf63206
Adding missing test from last commit.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8162 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-04-29 16:39:42 +00:00
renan.saddam
975ddaa4be
Fixes #6135 : Primary Key detection and load record fixtures on mssql. Tests added.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8161 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-04-29 16:26:03 +00:00
renan.saddam
48386b791f
Fixing cake_test_fixture and dbo_mssql tests. Refs #6135 .
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8159 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-04-28 22:20:04 +00:00
jperras
8bb11e49d7
Fixing counterCache behavior when updating an existing record's counterScope value. Thanks for the patch, mattcurry. Fixes #6270 .
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8155 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-04-25 01:17:21 +00:00
gwoo
fd0c39fcc6
fixes #6293 , Deleting non-existing record causes save() to fail. Thanks to msadouni for the patch and test!
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8150 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-04-22 16:47:34 +00:00
jperras
066629d566
Removing hard-coded 'id' field from Model::_prepareUpdateFields. Fixes #6274 .
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8139 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-04-13 14:15:58 +00:00
mariano.iglesias
364fe18208
Adding test to disprove issue. Closes #4693
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8124 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-03-22 13:09:50 +00:00
davidpersson
fd7d6718a1
Updating tests to not affect other ones when run from a group
...
Adding NoCrossContamination group
Shortening group class names
Renaming lib_controller group
Updating test imports to include the core AppController by default
Some cosmetics
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8123 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-03-21 23:55:39 +00:00
davidpersson
3c3b852099
Changing package of tests from "cake.tests" to "cake".
...
Moving tearDown et al. to the top of each test class.
Adding short descriptions to docblocks.
Adding missing docblocks.
Removing unnecessary blank lines and whitespaces.
Updating labels of test groups.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8116 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-03-18 17:55:58 +00:00
renan.saddam
76e0f17dbc
Updating documentation to improve code completion
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8114 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-03-17 21:10:28 +00:00
gwoo
de5907326e
fixes #6203 , Model::invalidFields respecting Model::whitelist
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8113 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-03-17 18:19:12 +00:00
mariano.iglesias
f1d25bcc20
Removing need to explicitly set IDs for Containable test, added in r6989
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8098 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-03-14 22:24:42 +00:00
nate
92cc331341
Updating docblocks and code formatting in XML classes, adding test change to previous commit.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8089 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-03-11 04:09:35 +00:00
nate
4466c9f7b7
Reverting changes to Behavior so that all models use the same behavior instance, fixes #6038 , refs #4408 .
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8087 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-03-11 00:06:41 +00:00
nate
cb95f13608
Correcting issue in String::insert() where 0 offsets were handled incorrectly, affecting issue where values were not properly quoted and inserted into conditions strings. Fixes #6163 .
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8085 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-03-09 20:03:02 +00:00
nate
eea46e7cc8
Fixing issue where calculated columns were getting quoted incorrectly. Test included. Reformatting code to be 100 characters or less.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8084 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-03-09 18:36:32 +00:00
mark_story
2a139b171c
Applying patch from 'farhadi' correcting regular expression when using magic findBy and fields that contain findBy in them. Fixes #6138
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8057 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-02-25 03:22:31 +00:00
renan.saddam
52f4cd42db
Fixing issue when Model::$translateTable is set
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8050 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-02-19 13:45:51 +00:00
jperras
82a8599098
Adding test case for Model::saveAll for HABTM data with additional fields saved in join table.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8049 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-02-19 07:59:52 +00:00
mark_story
ce4fa20f3f
Fixing escaping of fields in hasAny() also adding in correct model aliases.
...
Tests added.
Fixes #6089
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8032 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-02-15 21:05:42 +00:00
mark_story
b1b67c811c
Applying patch from 'ralph.marchildon' Fixes saving habtm data using 'with' data. Fixes #6077
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8021 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-02-11 03:53:04 +00:00
mark_story
d3ee6b31f1
Added conditional check for compatibility with MySQL 4.x result sets to DboMySqlBase::index(). Tests added. Thanks to 'teknoid' for the help. Closes #4503
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8020 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-02-08 23:09:08 +00:00
mariano.iglesias
b71457f332
Adding test case to show how auto-computed fields should be removed from data if using to clone records, closes #6066
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8019 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-02-07 14:56:37 +00:00
mark_story
1895f1c3be
Fixing saveAll() when used in conjunction with belongsTo data and validate => first. Tests added.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8010 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-01-25 23:48:28 +00:00
renan.saddam
dcf1c1e154
Added tests to disprove TreeBehavior can generate warning. Closes #5975 .
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8007 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-01-21 01:17:51 +00:00
nate
d75b063dca
Correcting quoted-alias replacement in DboSource, adding (and mocking) MS SQL test, fixes #5942
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8003 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-01-16 19:08:44 +00:00
mark_story
1111829e99
Fixing issue in __saveMulti() where unique was not always honoured. Thanks for the patch 'Jafinto'. Tests added. Closes #6006
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8001 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-01-16 04:09:44 +00:00
renan.saddam
157ee1efbf
Removing VALID_NUMBER and VALID_NOT_EMPTY from tests, applying patch from 'jperras'. Fixes #5901
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7999 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-01-15 01:55:31 +00:00
AD7six
b9ea171429
fixes #6003 tree behavior fails with uuids
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7997 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-01-15 00:50:01 +00:00
AD7six
5af1835722
adding tests for #6003
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7995 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-01-14 23:40:47 +00:00
gwoo
c53c28760f
closes #5968 , refs #5798 , reverts [7893], when dependent is true, conditions are not respected on HABTM associations when deleting parent record. [7893] would result in orphaned records. If more fine grained control is needed, create a model for the join table and handle it on an application/applicaiton basis.
...
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7988 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-01-14 22:01:01 +00:00