David Gallagher
35cc737261
Add for required fields when using only ModelValidator::add()
2013-07-30 11:11:49 +10:00
David Gallagher
bce0eb37b4
Don't need to check for empty because Model::validator() returns an interator
2013-07-30 11:09:43 +10:00
ADmad
a691e70065
Docblock and return type fixes
2013-07-29 19:13:31 +05:30
Mark Story
7269568ae6
Merge pull request #1460 from ravage84/cakeschematest-setup+teardown
...
Removed unused setup & teardown methods
2013-07-28 17:54:33 -07:00
Mark Story
e6452d6b9e
Merge pull request #1459 from ravage84/teardown
...
Added missing calls to setUp & teardown in tests
2013-07-28 17:54:10 -07:00
Marc Würth
3a4f7815e8
Removed unused setup & teardown methods from MyAppSchema in CakeSchemaTest
2013-07-29 01:55:32 +02:00
Marc Würth
1cac1846a3
Added missing calls to setUp & tearDown in tests
2013-07-29 01:52:39 +02:00
Christian Winther
4590b7d553
Merge pull request #1458 from ravage84/patch-2
...
Added return before redirects
2013-07-28 14:57:44 -07:00
Marc Würth
4a37ad5637
Added return before redirects
...
As recommended by the Cookbook:
http://book.cakephp.org/2.0/en/development/testing.html#testing-controllers
> When testing actions that contain redirect() and other code following the redirect it is generally a good idea to return when redirecting. The reason for this, is that redirect() is mocked in testing, and does not exit like normal. And instead of your code exiting, it will continue to run code following the redirect.
2013-07-28 23:44:07 +02:00
mark_story
8a81903e37
Fix FileEngine not clearing keys when groups are used.
...
Fixes #3930
2013-07-27 22:20:40 -04:00
mark_story
17b25388b3
Throw exceptions when '' is used as translation domain.
...
'' is never a good translation domain and often indicates developer
error. Treat it as a mistake and throw an exception.
Fixes #3939
2013-07-27 21:41:22 -04:00
mark_story
76aab0a635
Add failing test for #3930
2013-07-27 17:15:15 -04:00
mark_story
c28cde4e56
Update webroot files to fix an issue in ServerShell.
...
The previous fixes done in 2918ae9c7a
caused other issues preventing actions from being dispatched properly.
Fixes #3934
2013-07-27 17:01:35 -04:00
Christian Winther
b345a8f180
Merge pull request #1451 from Phally/master-3922
...
Strips the base off the generated URL from the AuthComponent.
2013-07-26 06:23:58 -07:00
Phally
f7eab23a5c
Strips the base off the generated URL from the AuthComponent.
...
Fixes #3922 .
2013-07-26 15:18:28 +02:00
David Gallagher
5937685817
Use ModelValidator::count() to count dynamiclly added validation rules
2013-07-26 22:44:59 +10:00
euromark
8b21710c95
whitespace correction
2013-07-25 13:26:21 +02:00
Christian Winther
5993ac39de
Merge pull request #1447 from Phally/master-bootstrap
...
Paths for App::build() require trailing /.
2013-07-22 05:37:50 -07:00
Phally
881e757a1e
Paths for App::build() require trailing /.
2013-07-22 13:51:09 +02:00
Christian Winther
1b3b4e6508
Merge pull request #1445 from Phally/master-3895-2
...
Fixes cake bake all. Refs #1443 .
2013-07-20 11:35:57 -07:00
Phally
5953171c7b
Fixes cake bake all. Refs #1443 .
2013-07-20 20:21:35 +02:00
Mark Story
09c21c5aa6
Merge pull request #1443 from Phally/master-3895
...
Replaces deprecated paginate() calls in controller bake templates.
2013-07-20 10:36:09 -07:00
Phally
6d6be87f8f
Replaces deprecated paginate() calls in controller bake templates.
...
Fixes #3895 .
2013-07-20 16:59:39 +02:00
Mark Story
1402796047
Merge pull request #1441 from ravage84/ViewTestsCleanup
...
Added missing test + minor cleanup of ViewTests.php
2013-07-19 19:40:09 -07:00
Marc Würth
da8e50a48a
Added missing test + minor cleanup of ViewTests.php
...
Added missing block reset test through assign().
Also made some minor cleanup in ViewTests.php. Mostly docblocks (params, returns) but also some unused variables.
2013-07-20 01:43:07 +02:00
Phally
db1876d837
Adds order to the test models to make the results more predictable.
...
Even though there was some code in place to prevent results in random
order from PostgreSQL we were still experiencing this with Jenkins
and Travis.
This commit removes the old code that handled this. From now on this
will be handled differently. Every test model will order by its
primary key. You can disable this by changing the order property
of the model to `null`: `$testModel->order = null`.
2013-07-19 22:31:09 +02:00
Mark Story
2f2fba3b39
Merge pull request #1437 from Phally/master-apc-errors
...
Fixes errors in tests with APC installed but not enabled in CLI.
2013-07-19 09:26:22 -07:00
Phally
36cac116d0
Fixes errors in tests with APC installed but not enabled in CLI.
2013-07-19 17:04:54 +02:00
mark_story
f725779a17
Better support various ranges as described in RFC2616
...
Refs #3914
2013-07-18 11:26:55 -04:00
mark_story
3f9e8e8113
Add missing calls to parent.
2013-07-18 11:04:09 -04:00
mark_story
717b1ded00
Update version number to 2.3.8
2013-07-17 22:15:15 -04:00
mark_story
a8f4ec0450
Simplify whitelist logic.
2013-07-16 19:33:06 -04:00
mark_story
d4db64ff26
Ignore asset requests containing %2e in them.
...
urldecode URI's early to avoid issues with encoded `.` characters.
2013-07-16 13:14:27 -04:00
mark_story
b873186468
Fix being unable to sort on custom synthetic columns.
...
If a sort field whitelist is used we should trust its data and also
trust that the developer wanted what they asked for. This solves issues
where it was impossible to sort on synthetic columns added in custom
find types.
Fixes #3919
2013-07-16 10:19:18 -04:00
mark_story
4d6258adeb
Correct off by one error.
...
Refs #3914
2013-07-15 21:48:03 -04:00
Mark Story
8d542e0923
Merge pull request #1420 from Phally/master-trycatcheverything
...
Moves code out of the try/catch block in Mysql::connect().
2013-07-15 08:39:52 -07:00
Phally
1fe424a62b
Moves code out of the try/catch blocks in the connect() methods.
...
That code wouldn't throw a PDOException, so having it in the
try/catch block is pointless. Moving it out makes it easier to
read.
2013-07-15 12:59:46 +02:00
Mark Story
c7e4076770
Merge pull request #1419 from ataylor32/fix-helper-test
...
Fix the "testAssetUrlNoRewrite" test
2013-07-14 05:36:33 -07:00
Adam Taylor
5a6f1259e3
Fix the "testAssetUrlNoRewrite" test
...
When running the test in the browser from somewhere other than
http://localhost (e.g. http://foo.dev ), the test was failing.
2013-07-13 23:38:55 -06:00
mark_story
d40c7376ce
Rebalance where URL normalization happens in AuthComponent.
...
Make URL's not include the base path when storing them in the session.
This makes future redirection simpler. When URL's are an array use
Router::url() on them.
Fixes #3916
2013-07-12 21:54:22 -04:00
mark_story
e016f1156f
Revert previous changes.
...
Adding this parameter was a mistake. Remove it.
2013-07-12 21:37:22 -04:00
mark_story
8133f72b53
Update AuthComponent to not strip when normalizing URLs.
...
Revert most of the changes done to fix #3897 originally and try
a different strategy of solving the base path issues and not breaking
apps running in a subdirectory.
Fixes #3916
2013-07-12 21:17:25 -04:00
mark_story
52be365598
Introduce the strip
argument to Router.
...
This allows callers to request that the basepath *not* be stripped off
when normalizing string URL's. This is important in AuthComponent when
handling redirect URL's as the redirect location could point to
a controller that shares a name with the base path.
Refs #3897
Refs #3916
2013-07-12 21:16:18 -04:00
Mark
f9fdc1e6e0
Merge pull request #1408 from dereuromark/master-cleanup
...
remove @access and unnecessary $name
2013-07-12 07:10:23 -07:00
mark_story
494fd05de6
Fix downloading Ranges in files.
...
Correctly handle ranges that don't terminate at the end of the file.
Also reject invalid ranges as described in RFC-2616.
Thanks to Kim Biesbjerg for the initial patch.
Fixes #3914
2013-07-11 23:20:12 -04:00
mark_story
b3273e9cc2
Correct documentation.
...
Options are traditionally above the @param block as it results in easier
to read API docs.
2013-07-11 21:00:11 -04:00
Mark Story
1ecc921e13
Merge pull request #1412 from wernerhp/master
...
Inflector pluralize and singularize update
2013-07-10 08:59:03 -07:00
Werner Pieterson
64ff9ad387
Fixed indenting
2013-07-10 17:51:42 +02:00
Werner Pieterson
3d83c628eb
Added more words to InflectorTest
2013-07-10 17:49:18 +02:00
Werner Pieterson
a27499d88a
Updated Inflector's 'pluralize and singularize to correctly handle addisional words.
...
Updated InflectorTest to test new words.
2013-07-10 17:46:01 +02:00