Commit graph

57 commits

Author SHA1 Message Date
mark_story
c8cf1a2c5b Updating __mergeVars to correctly merge parent and child component configurations.
Applied patch from 'neilcrookes'. 
Test case added. Fixes #6325

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8157 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-04-28 01:32:20 +00:00
mark_story
9491e4632d Applying patch from 'SkieDr' to fix custom find type pagination. Removes parameters from exiting paginate(). Test case added.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8137 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-04-07 14:56:30 +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
davidpersson
0ead89639a Adding tests for Controller::redirect.
Proves #6200 is invalid. 
Making original tests more strict.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8110 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-03-16 14:07:26 +00:00
mark_story
af021cb4b2 Adding Html entity conversion to all urls generated by helpers, fixing potential for merged passedArgs to create xss vectors.
Adding integer cast in paginate() to page param. 
Tests added/updated.
Fixes #6134

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8061 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-02-25 19:51:41 +00:00
mark_story
b1d05222b8 Adding tests to show filtering of page param when using Controller::paginate(). Refs #6134
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8054 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-02-24 01:59:58 +00:00
gwoo
43ad3d76e5 updating code from [8024] [8025]
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8031 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-02-15 20:13:14 +00:00
mark_story
e045e6826a Fixing Session from being added to components array twice.
Fixing greedy mergeVars with AppController.
Tests Added
Fixes #6091

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8024 3807eeeb-6ff5-0310-8944-8be069107fe0
2009-02-12 13:36:20 +00:00
AD7six
3f2fa6929b changing tabs for spaces in comment block indentation
Removing address and replacing with cakefoundation url


git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7805 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-10-30 17:30:26 +00:00
AD7six
ce0a71aef7 fixes #5603 Duplicate first parameter from the paginator with existing url args
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7777 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-10-23 22:20:03 +00:00
gwoo
62d1f367db adding test cases to show #5553 is invalid, $uses is not merged when == null.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7718 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-10-09 17:03:44 +00:00
nate
300dbc5e91 Correcting how parameters and default values are merged in Controller::paginate(), fixes #5503
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7688 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-10-02 00:46:26 +00:00
nate
4b8acf4647 Adding 'type' key to both sets of query calls in Controller::paginate(), fixes #5441
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7680 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-09-29 21:19:37 +00:00
renan.saddam
a628dfa028 Added test to prove #5482 (Trying to get property of non-object).
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7665 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-09-26 01:37:17 +00:00
mark_story
fafb01b09d Fixing modelClass when using plugin models.
Added TestPluginPost to test_app/test_plugin
Test case added.
Closes #5459

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7641 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-09-22 04:10:49 +00:00
mark_story
768e25c4fd Updating Controller::paginate(). Custom paginate() and paginateCount() methods now receive $extra params similar to find('all') and find('count') do. Allows the use of things like 'contain' with custom paginate() methods.
Test case added. Closes #5433 refs #5123.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7627 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-09-19 00:46:20 +00:00
gwoo
7fe1a03fda fixes #5331, model alias no longer overwritten
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7515 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-08-27 01:30:09 +00:00
gwoo
e35a215883 fixes #5307, model name being overridden by class registry for no reason, thanks to vizjerai for the helpful ticket.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7501 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-08-25 22:33:36 +00:00
gwoo
074ede4639 adding additional case for Router::normalize() and Controller::referer() to show #5157 is invalid
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7463 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-08-13 18:07:52 +00:00
TommyO
570145d568 Added test to show (deprecated?) support of string status codes in redirect().
Fixed fail on string status codes in redirect().

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7410 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-08-01 11:27:53 +00:00
mark_story
cc098629a6 Added direction check to Controller::paginate(). paginate() now forces 'asc' when wrong. Added tests. Closes #5120
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7357 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-07-24 02:46:39 +00:00
mark_story
0b23ec64ff Modified all remaining tests to use CakeTestCase. Switched all uses() calls to App::import().
Added tests to configure.test to test importing from plugins.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7348 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-07-21 02:40:58 +00:00
mark_story
b2d74c8be1 Added tests to cover model validation setting errors, controller render passing error and form helper field error display. Closes #5077.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7338 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-07-15 02:13:14 +00:00
gwoo
3ab12a868f updating controller test. closes #5029, if you change the content type with request handler in a test debug must be set to 0, see line 630 of RequestHandler. Fixed duration handling for core cache settings when debug equal to 1
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7309 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-07-04 13:26:43 +00:00
gwoo
1576a83505 fixing issue with sort in pagination and adding tests, removes previously deprecated controller methods and adds trigger_error to recent ones
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7276 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-27 00:43:31 +00:00
gwoo
73eab59ada closes #4000, added test case to show ext functionality is working as expected
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7248 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-23 20:09:24 +00:00
nate
df75a06756 Fixing coding standards violations in core, and adding misc tests
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7222 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-20 20:17:23 +00:00
the_undefined
2d8e63ae7b Refactored and updated postConditions to new operator syntax, fixes #4860
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7145 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-09 08:29:56 +00:00
DarkAngelBGE
5869715a19 fixing broken controller test
fixing multiple times defined constant AppControllerExists for the all group to run

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7139 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-08 14:35:14 +00:00
AD7six
a978fb2661 adding Doc blocks to everything in tests folder missed in the first pass.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7126 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-05 15:20:45 +00:00
mark_story
55bcf1e25e Components can have settings assigned in the components declaration, tests added. Closes #4055
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7112 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-04 02:39:05 +00:00
AD7six
f44c755475 Adding doc blocks to everything in the tests dir
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7094 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-02 19:22:55 +00:00
gwoo
cf896eaa9b refactoring component handling, closes #4795, tests added. deprecated Controller::_initComponents();
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7070 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-31 03:54:22 +00:00
nate
42da5aba81 Moving Cake folder to correct location
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7063 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-30 11:40:08 +00:00
DarkAngelBGE
e6e0d852a2 deleting cake folder from svn
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7061 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-30 10:59:16 +00:00
mariano.iglesias
62bf371aec Allowing paginate to override the default find type for fetching records.
Set the find type as the first string parameter in your paginate settings:
var $paginate = array('popular', ...);
Check the test case for an example.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7013 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-22 17:07:42 +00:00
mariano.iglesias
ac9a96663d Adding tests to paginate() to make sure extra parameters cannot be defined via URL
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7011 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-22 16:42:56 +00:00
DarkAngelBGE
d04101a95a refactoring Controller::referer
adding Controller::header() for testability
bring Controller up in code coverage

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6844 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-13 14:22:57 +00:00
gwoo
561f1deee0 adding test case, closes #3132
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6662 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-04-15 16:06:50 +00:00
gwoo
2071ae1656 adding case for default params to controller.test.php
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6645 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-04-09 15:34:33 +00:00
phpnut
06d06c85d9 "Fixes #4339, Providing null for variable with underscores leads to camelcased variable in view"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6626 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-04-02 20:14:06 +00:00
phpnut
cb53dc61b0 "Closes #2897, Built-in file validation.
Implemented Validation::extension(); and Vaidation::range();
Updated copyright notices in all files"

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6296 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-01 22:18:17 +00:00
gwoo
60f4dd360d updating View and Controller::flash, fixes #3749, tests added
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6177 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-20 01:19:19 +00:00
nate
e56b92255f Adding lower bound for page numbers in Controller::paginate() (Ticket #3683)
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6133 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-08 08:54:27 +00:00
phpnut
13530f42dc "Correcting typo"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6106 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-02 23:03:13 +00:00
phpnut
61eebea0f4 "Refactoring Controller::paginate()"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6105 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-02 22:58:23 +00:00
nate
00dc6dedb5 Adding fix for Controller::paginate() when default model is loaded from a plugin (Ticket #3660)
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6098 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-30 22:27:43 +00:00
phpnut
c000940e36 Closes #2119 Only define clone() in PHP4 when it hasn't been already defined.
Closes #2213, Support multiple plugin paths.
Closes #2234, filepaths to behavior classes should be cached in class.paths.php also
Closes #2345, ability to group components into subfolders
Closes #2645, Improvement to basic.php for class loading.
Fixes #3526, Cache::write, when using just the config name, it fails.
Fixes #3559, loading plugin model as assoc don't work.
Closes #3567 Controller Folders (Note this does not need routing to work, but controller names can not conflict with others in the same application so naming must still be unique)
Fixes #3579, email.php component: Parse error with php 4.

Adding new class and file importer.
Updated most of the core to use the importer.
Added ClassRegsitry::init() that will create and instance of an object and store it in the registry.
Deprecated most of the load functions in basics.php
Plugin model loading now forces using the dot notation, to use models within a plugin, all the model associations must be in the PluginName.Model syntax, if this is not used, the plugin will look for the models in the main app/models directory first, if not found then it will search the plugin directories recursively until it finds a model.
	var $belongsTo = array('SomeModel'); will look for some_model.php in the app/models
	var $belongsTo = array('MyPlugin.SomeModel'); will look for some_model.php in my_plugin/models
	var $belongsTo = array('MyPlugin.MyPlugin', 'SomeModel'); will used my_plugin/models/my_plugin.php and app/models/some_model.php
	
The controllers of the plugin will still look for the default models inside the plugin if var $uses is not set:
	var $uses = array('SomeModel'); will look for some_model.php in the app/models
	var $uses = array('MyPlugin.SomeModel'); will look for some_model.php in my_plugin/models
	var $uses = array('MyPlugin.MyPlugin', 'SomeModel'); will used my_plugin/models/my_plugin.php and app/models/some_model.php

All of the above will work between plugins and main app
These changes also allow placing model and controllers is sub directories
Removed old class.paths.php file generation 

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6001 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-16 09:35:19 +00:00
gwoo
2edfe3dd53 updating Controller::redirect(), closes #3522, deprecated Controller::cleanUpFields, see Model::deconstruct()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5973 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-09 02:34:00 +00:00