Commit graph

188 commits

Author SHA1 Message Date
Jose Lorenzo Rodriguez
979f7a28b5 Fixing a couple bugs in CakeResponse::checkNotModified() and implementing conditional rendering in
RequestHandlerComponent
2012-01-19 01:08:45 -04:30
Jose Lorenzo Rodriguez
28ee27e2dd Making it possible to cancel the render() process from any beforeRender listener 2012-01-19 01:08:45 -04:30
Jose Lorenzo Rodriguez
b79e0ad8f3 Moving checkModified() to CakeResponse, having it in the RequestHandler has too restrivtive 2012-01-19 01:08:45 -04:30
Jose Lorenzo Rodriguez
a7662eba57 fixing doc comment identation 2012-01-19 01:08:44 -04:30
Jose Lorenzo Rodriguez
dffe84cfbc Implementing RequestHandler::checkNotModified() as a helper for HTTP caching 2012-01-19 01:08:44 -04:30
0x20h
4532659fed code cleanup, added some tests 2012-01-18 20:59:44 +01:00
Jose Diaz-Gonzalez
adde2a9af5 Fixed broken Controller::setAction() testcase 2012-01-15 15:16:49 -05:00
Jose Diaz-Gonzalez
ad2472aab0 Testcase for Controller::setAction() 2012-01-15 15:00:30 -05:00
0x20h
c6624faf76 more clear test setup 2012-01-13 23:51:18 +01:00
0x20h
9838338976 docblocks 2012-01-13 23:34:35 +01:00
0x20h
ef5eead038 use more appropriate array key when passing options to the adapter 2012-01-13 21:55:47 +01:00
0x20h
153152642c PHP configuration file base Acl implementation 2012-01-13 21:43:48 +01:00
Mark Story
b76f8f8832 Merge pull request #260 from tPl0ch/2.1-authenticate
Added 'recursive' settings option to BaseAuthenticate and BasicAuthenticate
2012-01-12 18:53:19 -08:00
mark_story
7877e7f997 Make allow(null) and deny(null) consistent with no args.
No arguments and a single null should be handled the same.

Fixes #2461
2012-01-10 20:32:12 -05: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
f4c27e04bc Fix errors generated when option['order'] is undefined.
Fixes #2447
2012-01-08 21:55:51 -05:00
Jose Lorenzo Rodriguez
7c0297a92c Merge branch '2.1' of github.com:cakephp/cakephp into 2.1 2012-01-05 19:58:15 -04:30
Jose Lorenzo Rodriguez
00a0c60733 Removing 1.3 Backwards compatible code to load underscored files. Now you can App::build('Locale') instead of 'locales' 2012-01-05 19:56:01 -04:30
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
Mark Story
83b28c42cf Fix failing tests and missing boundary markers.
When sending html + text emails, there were duplicate multipart/alternative sections
and the trailing top level boundary was missing.
2011-12-27 23:38:21 -05:00
Jose Lorenzo Rodriguez
35ecbfebde Making the CakeEvent -> ObjectCollection bridge more intelligent, adding tests 2011-12-25 23:17:08 -04:30
Jose Lorenzo Rodriguez
7fdc1cc8d4 Migrating the beforeRedirect callback to the CakeEventManager, reorganizing how events are triggered in controller 2011-12-25 22:48:27 -04:30
Jose Lorenzo Rodriguez
ffa12f4d47 Fixing test and implementing return values for events 2011-12-25 21:52:12 -04:30
Jose Lorenzo Rodriguez
5d67195bf7 Migrating Controller events to use the CakeEventManager 2011-12-25 14:44:34 -04:30
ADmad
389072708a Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Test/Case/Model/ModelReadTest.php
	lib/Cake/Utility/Debugger.php
2011-12-22 03:15:04 +05:30
Kyle Robinson Young
51f9837db4 Code standards formatting 2011-12-15 22:52:07 -08:00
mark_story
f1b566b88e Fix failing tests.
Remove duplicated test.
2011-12-15 23:45:13 -05:00
mark_story
2e8498e166 Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Model/Datasource/Database/Postgres.php
	lib/Cake/Test/Case/Console/TaskCollectionTest.php
	lib/Cake/Test/Case/Model/ModelIntegrationTest.php
	lib/Cake/Test/Case/Utility/ClassRegistryTest.php
	lib/Cake/Utility/ClassRegistry.php
2011-12-11 22:51:40 -05:00
Kyle Robinson Young
1e1c7a036d Code consistency formatting tweaks 2011-12-06 12:52:48 -08:00
Kyle Robinson Young
5388237099 Consistently setting setUp() and tearDown() on test cases 2011-12-04 13:27:51 -08:00
mark_story
9296f770d5 Adding SecurityComponent::$csrfLimit
This property allows you to control the number of tokens
that will be kept active.  Its possible to make really large
CSRF collection sizes.  Capping the number of tokens allows developers
to better control session sizes.
2011-12-03 20:13:17 -05:00
mark_story
e421b3bc8f Adding SecurityComponent::generateToken()
This method allows end developers to add the csrf tokens
manually, if they aren't added automatically.

Tokens are cheap to generate, simplifying the logic
makes things a bit easier to understand.
2011-12-03 20:13:03 -05:00
mark_story
6d269ce25d Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Config/config.php
	lib/Cake/Console/Command/Task/ModelTask.php
	lib/Cake/Console/Command/TestsuiteShell.php
	lib/Cake/Model/CakeSchema.php
	lib/Cake/Model/Datasource/Database/Sqlite.php
	lib/Cake/Test/Case/Model/ModelTestBase.php
	lib/Cake/Test/Case/Routing/DispatcherTest.php
	lib/Cake/Test/Case/Utility/FileTest.php
	lib/Cake/VERSION.txt
2011-12-03 13:45:28 -05:00
Kyle Robinson Young
94e119fe67 Adhere to code formatting standard 2011-11-30 23:21:31 -08:00
mark_story
a56ad0ccac Fixing failing tests. 2011-11-28 21:36:44 -05:00
Jose Lorenzo Rodriguez
f6534d2962 Fixing issue where changing the case for an action in the url would allow the action in the AuthComponent making it accessible to not-logged in users 2011-11-28 00:52:47 -04:30
mark_story
b0d0e06b97 Update RequestHandler tests for new View classes. 2011-11-27 23:51:49 -05:00
Ceeram
f57c287c43 fixing test to ensure tests dont fail on 1 second timestamp diff 2011-11-22 17:21:00 +01:00
Ceeram
7d6637f55b ensure test doesnt fail by 1 second diff in timestamp 2011-11-22 10:57:36 +01:00
mark_story
21cd3f00ac Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Test/Case/BasicsTest.php
2011-11-19 20:40:07 -05:00
m
2957a33b23 assertEqual to assertEquals in core test files
Signed-off-by: mark_story <mark@mark-story.com>
2011-11-19 09:25:03 -05:00
mark_story
fa0ec44dfd Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Test/Case/Console/Command/CommandListShellTest.php
	lib/Cake/Test/Case/Error/ExceptionRendererTest.php
	lib/Cake/Test/Case/Utility/DebuggerTest.php
	lib/Cake/Test/Case/View/Helper/TextHelperTest.php
2011-11-16 21:31:16 -05:00
Kyle Robinson Young
98f03dc6df Replacing test case compatibility functions 2011-11-16 21:07:08 -05:00
Ceeram
e5c8a446d6 Add sorting on joined model virtual field, fixes #2250 2011-11-17 00:18:12 +01:00
mark_story
fb7d931bef Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Config/config.php
	lib/Cake/VERSION.txt
2011-11-15 23:10:34 -05:00
Daniel Pakuschewski
841c0c2295 Dropped support for wildcard in AuthComponent::allow()
Conflicts:

	lib/Cake/Controller/Component/AuthComponent.php
2011-11-15 23:01:04 -05:00
mark_story
6e4493cc14 Fix ambiguous content types in RequestHandler.
Treat xhtml + html as content types that should trigger no
response/extension setting.  They are different but similar in
that they both generally use the same HTML templates.

Fixes #2257
2011-11-15 22:48:54 -05:00
mark_story
0a0a09920b Updating for PHP5.4
- Fixing strict errors.
- Fixing call time pass by reference as its been removed in PHP5.4
- Fix assign new as a reference, which has been removed.
2011-11-12 21:42:19 -05:00
mark_story
bfd95d0e04 Fixing remaining failing tests in PHPUnit 3.6 2011-11-04 22:54:09 -04:00
mark_story
d68053c4d4 Fix exception expectations.
PHPUnit 3.6 does not allow you to expect the generic Exception
class.
2011-11-04 22:54:08 -04:00
mark_story
a929951038 Fix issue with Controller::setAction()
Calling setAction did not modify which view file was
rendered.  This was a regression with 1.3

Fixes #2212
2011-11-03 20:13:41 -04:00
mark_story
550076d75e Fix issue in RequestHandlerComponent.
Fixes issues where response and request properties would
not be set as the initialize() callback would have not fired.

Fixes #2190
Fixes #2189
2011-10-31 22:41:43 -04:00
José Lorenzo Rodríguez
f51be0a82c Merge pull request #278 from Danielpk/enhancement_auth_deny
Added enhancement to AuthComponent::deny().
2011-10-30 15:38:21 -07:00
Daniel Pakuschewski
7cde0b654c Removed tests for deny('*') to prevent people get confused with it 2011-10-29 13:57:04 -02:00
Daniel Pakuschewski
09579198a9 Droped support to deny('*'). 2011-10-29 13:54:35 -02:00
Gun.io Whitespace Robot
4742168253 Remove whitespace [Gun.io WhitespaceBot] 2011-10-28 18:25:08 -04:00
Daniel Luiz Pakuschewski
8738ef3dc2 Added tests to deny() and deny('*') 2011-10-26 22:07:57 -02:00
mark_story
e457c14dec Fix issues with stateless authentication.
Cookies and sessions are no longer required for stateful authentication.
AuthComponent::user() also works correctly in these situations as well.

Fixes #2134
2011-10-23 12:54:51 -04:00
Graham Weldon
b165acd926 Fixed EmailComponent test 2011-10-23 00:28:47 +11:00
Thomas Ploch
521dff8468 Added 'recursive' settings option to BaseAuthenticate and BasicAuthenticate to have a bit more fine grained control in custom Authenticate objects. 2011-10-19 17:54:08 +02:00
Renan Gonçalves
646b8f1aa0 Fixed issue when using multiple extensions in Router::parseExtensions() could result in undefined index notice by RequestHandlerComponent. 2011-10-19 15:36:00 +02:00
Renan Gonçalves
1cf67b1e55 Little cleanup in exceptions.
- Removed duplicated or non-used exceptions.
- Making the error messages more descriptive and stardard.
2011-10-15 20:08:02 +02:00
mark_story
4090b3e8c6 Fix content-type detection to accomodate jQuery.
Add tests for jQuery content type strings.
Refactor tests, add in missing assertions and missing parent calls.
The new behavior is more lenient and allows for a single requested
content type to switch the view type.

Fixes #2088
2011-10-12 23:21:07 -04:00
Renan Gonçalves
49f4035412 Fixing bug when trying to Paginate ordering by multiple keys. 2011-10-12 14:51:46 +02:00
Majna
8c3f64be52 Fixing doc blocks in Test suite and some visibility keywords. 2011-10-10 23:18:48 +02:00
mark_story
d9e51acf0a Fixing failing tests caused by merge with 1.3 2011-10-06 21:23:35 -04:00
mark_story
055224ef68 Merge remote-tracking branch 'origin/1.3' into merger
Conflicts:
	cake/libs/controller/controller.php
	cake/libs/model/datasources/dbo/dbo_mysqli.php
	cake/tests/cases/libs/controller/controller.test.php
	cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php
	cake/tests/lib/cake_test_suite_dispatcher.php
	lib/Cake/Model/Behavior/TranslateBehavior.php
	lib/Cake/Model/Datasource/DataSource.php
	lib/Cake/Model/Datasource/Database/Mysql.php
2011-10-06 21:06:40 -04:00
Jose Lorenzo Rodriguez
0a2553cce5 Making model tests less time dependent 2011-10-03 14:51:07 -04:30
mark_story
c9bd97309f Merge branch '1.3' into merger
Conflicts:
	cake/libs/configure.php
	cake/libs/controller/components/email.php
	cake/libs/model/datasources/dbo/dbo_mysqli.php
	cake/libs/view/pages/home.ctp
	cake/tests/cases/libs/controller/components/email.test.php
	cake/tests/cases/libs/model/datasources/dbo_source.test.php
	lib/Cake/Config/config.php
	lib/Cake/Console/Command/Task/ViewTask.php
	lib/Cake/Model/Datasource/DboSource.php
	lib/Cake/Model/Model.php
	lib/Cake/Test/Case/Model/ModelReadTest.php
	lib/Cake/Test/Case/Model/ModelValidationTest.php
	lib/Cake/Test/Case/Utility/InflectorTest.php
	lib/Cake/Test/Case/View/Helper/FormHelperTest.php
	lib/Cake/Utility/Inflector.php
	lib/Cake/Utility/Validation.php
	lib/Cake/VERSION.txt
	lib/Cake/View/Helper.php
	lib/Cake/View/Helper/FormHelper.php
2011-10-01 22:38:20 -04:00
mark_story
a5fe702624 Updating CrudAuthorize to work like ActionsAuthorize.
Updating tests.
Fixes #1749
2011-09-26 20:38:38 -04:00
mark_story
b1dad6e5bd Adding session renewal upon login/logout.
This helps improve session security, as it reduces the opportunity
of replaying a session id successfully.
Fixes #836
2011-09-24 22:35:21 -04:00
mark_story
50a0a51f53 Renaming method to better match what it does. 2011-09-24 21:56:37 -04:00
mark_story
09e7f1d491 Splitting apart the Scaffold and ScaffoldView tests.
Fixes #1985
2011-09-16 22:08:19 -04:00
mark_story
42dccac8da Splitting AclTest into multiple test case files.
Fixes #1985
2011-09-13 21:25:50 -04:00
mark_story
d74f442608 Making test case class names match file names.
Refs #1985
2011-09-12 23:01:04 -04:00
Mark Story mark@mark-story.com
572412ec6b Removing bad integration test that wasn't required anymore. 2011-09-01 00:23:59 +01:00
Mark Story mark@mark-story.com
bb3a1d546b Fixing RequesHandler::prefers(). It was previously entirely wrong.
It took the ordered list of accept types, and blindly assumed
the first in the list was the most preferred.  This is an incorrect
assumption to make, as all types with the same q value are equal.

- Using CakeRequest::parseAccept() to access only the most preferred
content types.
- Using in_array() to check for the desired type.
- Updating tests for RequestHandler.
2011-09-01 00:20:54 +01:00
Juan Basso
840d27bbb9 Fixed the allow method to parameters not be required. 2011-08-30 21:12:57 -04:00
mark_story
5df12a287e Fixing failing tests caused by moving params[ext]. 2011-08-27 10:36:11 -04:00
Juan Basso
c60abb1802 Fixed tests affected by the visibility changes. 2011-08-24 23:10:51 -04:00
Juan Basso
dbb87a0196 Changed protected callbacks of scaffold to public in Controller. 2011-08-21 23:18:55 -04:00
Juan Basso
a1a049c700 Merge remote-tracking branch 'origin/2.0' into 2.0-api-doc
Conflicts:
	lib/Cake/Model/Model.php
	lib/Cake/View/Helper/CacheHelper.php
2011-08-20 01:47:27 -04:00
Juan Basso
61833294f0 Changed the visibility to methods that not affect others classes. 2011-08-20 01:39:30 -04:00
Mark Story
54e1de9070 Adding visibility keywords to code that came from
a 1.3 merge.
2011-08-16 22:40:38 -04:00
Juan Basso
620a65b2fc Merge branch '2.0' into 2.0-api-doc
Conflicts:
	lib/Cake/Test/Case/View/Helper/CacheHelperTest.php
	lib/Cake/Utility/Debugger.php
2011-08-14 21:12:05 -04:00
mark_story
d93c8cb200 Merge branch '1.3' into merger
Conflicts:
	cake/libs/controller/components/security.php
	cake/libs/view/pages/home.ctp
	cake/libs/view/view.php
	lib/Cake/Cache/Engine/FileEngine.php
	lib/Cake/Config/config.php
	lib/Cake/Model/Datasource/Database/Postgres.php
	lib/Cake/Test/Case/Utility/SanitizeTest.php
	lib/Cake/Test/Case/Utility/SetTest.php
	lib/Cake/Test/Case/View/Helper/CacheHelperTest.php
	lib/Cake/Test/Case/View/Helper/FormHelperTest.php
	lib/Cake/VERSION.txt
	lib/Cake/View/Helper/CacheHelper.php
2011-08-14 14:39:49 -04:00
mark_story
3014d3fb84 Fixing issues with CSRF token failure and requestAction.
Fixes #1900
2011-08-12 20:38:24 -04:00
Juan Basso
9bc3e567c1 Removed the @access and @static. 2011-07-30 20:56:48 -04:00
mark_story
f9373ff504 Fixing double output issues with Scaffold. 2011-07-28 18:09:19 -04:00
Jose Lorenzo Rodriguez
cfd2d9e00b Updating all @package annotations in doc blocks 2011-07-26 01:46:14 -04:30
Jose Lorenzo Rodriguez
21ff9caac7 Solving scope problem after clearing up variables in the default routes file 2011-07-25 23:58:08 -04:30
Juan Basso
b8c00d5f56 Changed the paginator to do a count after the find. 2011-07-23 21:09:55 -04:00
mark_story
6fb3c72d49 Fixing issue where plugin models in $uses, would create
incorrect forms when create() is called with no arguments.
Fixes #1841
2011-07-23 14:49:39 -04:00
Mark Story
ec3de84c4e Removing getResponse, its not used and it doesn't serve much purpose. 2011-07-22 20:29:45 -04:00
mark_story
16073b4e44 Fixing notice errors in Router.
Updating AuthComponent tests for changes in Router behavior.
2011-07-22 20:29:45 -04:00
mark_story
b56931383c Adding tests. 2011-07-22 20:29:44 -04:00
mark_story
61ab769f1c Moving tests for private actions to ControllerTest. 2011-07-22 20:29:44 -04:00
mark_story
70744f3cb4 Fixing failing tests for Controller.
Adding a string cast for easier testing.
2011-07-22 20:29:44 -04:00
mark_story
173e043eaf Fixing more failing tests caused by requestAction
and changes in Controller::__construct.
2011-07-22 20:29:44 -04:00
mark_story
fc08784c22 Making Controller tests pass. 2011-07-22 20:29:43 -04:00