Commit graph

3204 commits

Author SHA1 Message Date
Rachman Chavik
f89bc6503a CakeTime::format crashed when timezone is passed 2012-05-17 19:05:45 +07:00
mark_story
4dc07b6d39 Merge branch '2.1' into 2.2 2012-05-16 21:08:06 -04:00
mark_story
c6258fa68c HTML escape context variables.
When creating HTML or js errors the context should be
escaped, as it is very possible that the context vars will contain
HTML.

Clean up some internals in Debugger::outputError().  There were
a few duplicate data structures, and $$ variables.

Fixes #2884
2012-05-16 21:07:45 -04:00
Mark Story
fd216c4dda Merge pull request #655 from jellehenkens/2.2-app-dir-tests
Updating CakeSchema test case to test non standard app folder names
2012-05-16 09:52:17 -07:00
Rachman Chavik
c9b801b96d making CakeLog to work with bogus $type and $scope
closes #2881
2012-05-16 08:16:20 +07:00
mark_story
a37bdba8fe Revert accidental change. 2012-05-15 21:07:43 -04:00
mark_story
7d9f441020 Add documentation. 2012-05-15 21:00:18 -04: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
0faaedfff5 Split up tests.
Fix API usage in tests.
2012-05-14 21:32:31 -04:00
mark_story
cbd6cafed7 The event manager should be re-used.
View::__construct() gets the controller's event manager,
only to override it the first time getEventManager() is called.

Don't overwrite the Controller's event manager as it allows plugins
to more easily hook into the view process.
2012-05-14 21:18:09 -04:00
Rachman Chavik
6bb29ea03b changing CakeLog::_autoConfig for better bc
closes #2880
2012-05-15 08:16:55 +07:00
Jelle Henkens
ef270b95c7 Fixing test assert for APP_DIR scenarios with non standard folder names 2012-05-13 18:12:31 +01:00
Jelle Henkens
0d9506fa2e Fixing issue where nice and niceShort did not use the timezone if no dateString is passed 2012-05-13 13:43:06 +01:00
Rachman Chavik
6ede36f8e0 removing unneeded LOG_* constant checks 2012-05-13 18:51:57 +07:00
Rachman Chavik
e6860fb856 changing LOG_ERROR to LOG_ERR in core files 2012-05-13 18:51:57 +07:00
Rachman Chavik
595cad84b3 ensure that plain CakeLogInterface still works 2012-05-13 18:51:57 +07:00
Rachman Chavik
8e8763d69d change to match syslog levels & customizable levels 2012-05-13 18:51:57 +07:00
Jelle Henkens
dbd826f794 Removing extra space in the extract() calls 2012-05-13 10:37:50 +01:00
mark_story
64f03acd4c Fix code standards errors. 2012-05-12 23:28:43 -04:00
mark_story
d9244048b6 Fix hard coded date. 2012-05-12 23:25:11 -04:00
mark_story
579aff5ad3 Fix error with options. 2012-05-12 22:35:49 -04:00
mark_story
176ec2df0c Add documentation on additional options. 2012-05-12 22:26:34 -04:00
mark_story
683146de14 Add a few more tests. 2012-05-12 22:26:34 -04:00
mark_story
0edbe0a123 Fix more whitespace. 2012-05-12 22:26:34 -04:00
mark_story
14bfd83dad Reduce complexity in timeAgoInWords.
All the special cases were handled by the deeply
nested if.
2012-05-12 22:26:34 -04:00
mark_story
ca8046bfea Fix whitespace and formatting. 2012-05-12 22:26:33 -04:00
mark_story
a80a7dadf8 Re-factor element generation.
Add the ability for arbitrary attributes.
Use built-in methods for attribute generation.
Add tests for element generation.
2012-05-12 22:26:33 -04:00
mark_story
4f12f254f4 Add test for element. 2012-05-12 22:26:33 -04:00
mark_story
fd5a8a8d6b Fix code standards.
Remove failing test, and fix coding standards.
2012-05-12 22:26:33 -04:00
Magnus Johansson
352fbde2ec Move out HTML logic to Helper/TimeHelper.php. The Utility/CakeTime.php timeAgoInWords() now returns a string with the time, while the same function in Helper/TimeHelper.php may return an HTML element. 2012-05-12 22:26:33 -04:00
Magnus Johansson
9fa531d6e3 Added test cases for new features. 2012-05-12 22:26:33 -04:00
Magnus Johansson
0729aca706 Added some more intelligence to the CakeTime class 2012-05-12 22:25:48 -04:00
ADmad
14b7210d2b Fixed server offset calculation 2012-05-13 06:20:29 +05:30
mark_story
9628910c86 Merge branch '2.1' into 2.2 2012-05-12 20:26:36 -04:00
mark_story
8103eae9f1 Make input prompt clearer in extract task.
Make the prompt display the paths that will be scanned.  Hopefully
this makes the shell a bit easier to use and understand. Also
make the shell not accept 0 paths as a correct answer.

Fixes #2877
2012-05-12 20:26:11 -04:00
Jelle Henkens
c2920aa3bf Fixing small variable typo 2012-05-12 18:43:39 +01:00
mark_story
a3a2655fd5 Fix whitespace errors. 2012-05-11 21:38:21 -04:00
Mark Story
5d3291ba19 Merge pull request #645 from huoxito/2.2
Make controller test template extends ControllerTestCase instead of CakeTestCase
2012-05-11 17:35:34 -07:00
ADmad
eeff950cf9 Removing default null value for $data parameter. Refs GH pull request #646 2012-05-12 00:18:47 +05:30
Washington
287c7b432a fix broken tests for TestTask class 2012-05-11 15:30:47 -03:00
Washington
c651bf25d3 remove stub class from controller tests template and mock condition to
make it extends ControllerTestCase
2012-05-11 14:51:56 -03:00
Rachman Chavik
335f3558a9 fixing null request returned by Router::getRequest()
fixes issues for Router::getRequest() called in a Plugin/Foo/routes.php
during bootstrap.
2012-05-11 22:16:17 +07:00
Rachman Chavik
e5b33627d5 minor updates to the logging changeset
- change usage of Set to Hash
- updating bootstrap.php
- adding docblocks
- avoid silencing unlink errors in tests
2012-05-11 21:19:45 +07:00
Rachman Chavik
be9bcfd4b5 adding convenience methods for CakeLog 2012-05-11 12:37:01 +07:00
Rachman Chavik
6040d96710 adding scoped logging 2012-05-11 12:37:01 +07:00
Rachman Chavik
a269a123c4 reorder constant definitions 2012-05-11 12:37:01 +07:00
Rachman Chavik
05243a1c0a updating Shell tests related to Console logging 2012-05-11 12:37:01 +07:00
Rachman Chavik
e11f6b7fe4 adding tests for ConsoleLog engine 2012-05-11 12:37:01 +07:00
Rachman Chavik
70177e4dbd updating tests for CakeLog
- ObjectCollection operations
- Selective logging
2012-05-11 12:37:01 +07:00
Rachman Chavik
68b49950af fix ErrorHandlerTest 2012-05-11 12:37:01 +07:00
Rachman Chavik
bb090c54cf changing Shell to use ConsoleLog 2012-05-11 12:37:00 +07:00
Rachman Chavik
d10727797b new ConsoleLog logging engine 2012-05-11 12:37:00 +07:00
Rachman Chavik
5c4f741529 add default logging config in Config/bootstrap.php 2012-05-11 12:37:00 +07:00
Rachman Chavik
b71e814191 selective logging by scope 2012-05-11 12:37:00 +07:00
Rachman Chavik
49bc818d36 new base class Log/Engine/BaseLog 2012-05-11 12:37:00 +07:00
Rachman Chavik
aab1eb6c37 refactor to use ObjectCollection 2012-05-11 12:37:00 +07:00
Rachman Chavik
edb44aadea Merge branch '2.1' into 2.2 2012-05-11 12:34:26 +07:00
Jose Lorenzo Rodriguez
fe659c0c33 Refactored FormHelper to take advantage of the new validator object 2012-05-10 23:14:26 -04:30
Jose Lorenzo Rodriguez
217bf85537 Implemented new method isEmptyAllowed in CakeValidationRule 2012-05-10 23:13:45 -04:30
Jose Lorenzo Rodriguez
785cf8354c Fixing merge artifacts to make all tests pass 2012-05-10 22:36:55 -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
efc3536adb Fixing a couple errors introduced in previous commit 2012-05-10 22:04:55 -04:30
Jose Lorenzo Rodriguez
2b7c2ad691 Fixing doc blocks for CakeValidationRule and changing visibility for some methods 2012-05-10 21:51:54 -04:30
Jose Lorenzo Rodriguez
34531d9d7c Cahnging doc in header for CakeValidationSet 2012-05-10 21:41:42 -04:30
Jose Lorenzo Rodriguez
c4202b7b22 Improving docs for CakeValidationSet 2012-05-10 21:39:53 -04:30
Jose Lorenzo Rodriguez
8c9c6b4a5a Improving docs for ModelValidator 2012-05-10 21:27:01 -04:30
Rachman Chavik
15a74722b3 use LOGS constant 2012-05-11 08:33:53 +07:00
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
Rachman Chavik
a96e4397be check extension before passing to addTestFile() 2012-05-10 20:55:47 -04:30
Rachman Chavik
89959afa63 fix incorrect __construct params for mock object 2012-05-10 20:55:47 -04:30
Jose Lorenzo Rodriguez
f06fbb0075 Making validateAssociated overwrite data consistently with validateMany 2012-05-10 20:55:47 -04:30
Jose Lorenzo Rodriguez
82e87791f6 Ugly hack to fix saveAll deep and beforeValidate callbacks changing model data 2012-05-10 20:55:47 -04:30
Jose Lorenzo Rodriguez
1481f82ec1 Added warning messages in doc block for validateMany and validateAssociated about first param being passed by reference 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
Jose Lorenzo Rodriguez
e4c88d8cf9 Revert "Merge pull request #644 from nodesagency/hotfix/beforeValidate-copy-data"
This reverts commit 0f54758e5a, reversing
changes made to b4a42e4a03.
2012-05-10 20:55:47 -04:30
Jose Lorenzo Rodriguez
2cea668755 Revert "Merge pull request #643 from nodesagency/hotfix/beforeValidate-copy-data"
This reverts commit b4a42e4a03, reversing
changes made to 6bd7da36e7.
2012-05-10 20:55:46 -04:30
Christian Winther
ad4e46150a Fixing saveMany 2012-05-10 20:55:46 -04:30
Christian Winther
fbd2132300 Another fix for Pull request 642 2012-05-10 20:55:46 -04:30
Jelle Henkens
484c3ec688 Adding support for a trailing & or & in the existing queryString 2012-05-10 20:55:46 -04:30
Christian Winther
7a1275a1b1 Copy changes made to $this->data in beforeValidate callbacks back to saveAssociated data variable
This allow changes in beforeValidate to be saved
2012-05-10 20:55:46 -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
Jelle Henkens
e53074dab9 Fixing order inconsistency in queryString and bug with string based existing querystring 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
Phally
c9e59c3b51 Removed triple nested condition. 2012-05-10 20:55:45 -04:30
Frank de Graaf
2be9ac8888 Fixed HTTP status codes for non-redirects which were breaking AuthComponent. 2012-05-10 20:55:45 -04:30
mark_story
7695da637c Use correct argument order. 2012-05-10 20:55:45 -04:30
Washington
a238116734 make controller test template extends ControllerTestCase 2012-05-10 20:34:30 -03:00
AD7six
6933b31be5 include plugin name in model tests 2012-05-11 00:33:10 +02:00
AD7six
6aca8036f4 baked tests match code standard by default 2012-05-10 23:51:22 +02:00
AD7six
08c3008874 load app classes automatically for plugins
Otherwise baking a test for a plugin model (example) fails
2012-05-10 23:51:09 +02:00
Rachman Chavik
73c66e2df4 fixing method signature in test models 2012-05-10 19:47:10 +07:00
Rachman Chavik
2598d17670 check extension before passing to addTestFile() 2012-05-10 19:06:04 +07:00
Rachman Chavik
5b67534acc fix incorrect __construct params for mock object 2012-05-10 13:35:01 +07:00
Jose Lorenzo Rodriguez
b54dc69f64 Making validateAssociated overwrite data consistently with validateMany 2012-05-10 00:52:54 -04:30
Jose Lorenzo Rodriguez
6da2fe8323 Ugly hack to fix saveAll deep and beforeValidate callbacks changing model data 2012-05-10 00:47:35 -04:30
Jose Lorenzo Rodriguez
00a34f14fe Added warning messages in doc block for validateMany and validateAssociated about first param being passed by reference 2012-05-10 00:07:05 -04:30
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