AD7six
09cf69c452
Pass Controller:$components config to mocked components
...
Otherwise there can be significant differences in behavior between using
an unmodifiedcomponent in testAction and using a mock as the config will not be
propogated from the controller
2013-08-19 10:33:16 +00:00
mark_story
95b74bd9ef
Make sure ComponentCollection has the controller dependency.
...
Add setter method as changing ComponentCollection's constructor now is
not possible. This fixes issues where components that rely on
Collection->getController() in their constructor can work properly.
Fixes #3946
2013-07-30 09:09:52 -04:00
Marc Würth
4c9f0414cb
Improved the DocBlocks and other code cleanup
...
Fixed @license tag, url comes first
Whitespace and other minor code cleanup
Added some docblocks
2013-05-31 00:11:19 +02:00
mark_story
82d57fb8b2
Add mocked components to the enable list of components.
...
Mocked components should be enabled so they receive callbacks. This
allows more realistic integration tests using testAction(). Stop
disabling the constructor as it causes a number of errors with
components that use components.
Fixes #3842
2013-05-20 22:22:22 -04:00
mark_story
9cdc3927f2
Tidy up variable names.
...
Variables with _ in them are confusing, try to use clearer names.
2013-05-20 21:52:08 -04:00
euromark
111366d5c8
== to === and != to !== where applicable
2013-02-12 03:38:08 +01:00
Graham Weldon
66d856d883
Added extra line for referencing license file for copyright
2013-02-08 21:22:51 +09:00
Graham Weldon
7b860debe4
This commit is dedicated to Mark Story, who has put in much dedicated time and effort into CakePHP over the years.
...
I just wanted to ruin his evening, because this change needs to be merged into CakePHP 3.0.
2013-02-08 20:59:49 +09:00
euromark
b811afbc44
double spaces to single ones
2012-12-22 23:48:15 +01:00
José Lorenzo Rodríguez
a8bd7c6678
Merge pull request #961 from dereuromark/2.3-unify-object-collection
...
2.3 unify object collection
2012-12-22 14:24:26 -08:00
ADmad
72d6ca636f
Docblock fixes
2012-11-29 04:36:29 +05:30
mark_story
27d7e2865e
Merge branch 'master' into 2.3
...
Conflicts:
lib/Cake/Console/Command/ConsoleShell.php
lib/Cake/Network/CakeSocket.php
lib/Cake/Network/Http/HttpResponse.php
lib/Cake/Utility/Folder.php
lib/Cake/View/MediaView.php
lib/Cake/basics.php
2012-11-20 23:02:33 -05:00
euromark
8acdb129b2
unify object load/unload and loaded methods
2012-11-16 12:14:28 +01:00
Ceeram
56225bcca3
fix all warnings except TODO warnings
2012-11-14 12:56:10 +01:00
Reuben Helms
4d87abfcdc
Add CakeTestCase::getMockForModel convenience method
...
This method provides a convenience to create mocked models that
are still associated with fixtures and the datasource.
2012-11-13 13:07:18 +10:00
mark_story
00f3e7e441
Fix silent failures.
...
Fixes #3133
2012-08-20 16:19:34 -04:00
mark_story
4541510e26
Fix notice error when a missing action error is hit.
2012-07-29 22:37:41 -04:00
mark_story
7b5e45b965
Merge branch '2.1' into 2.2
...
Conflicts:
lib/Cake/Model/Datasource/DataSource.php
lib/Cake/VERSION.txt
2012-05-03 21:06:35 -04:00
mark_story
004bc5b6e7
Fix overwriting of GET/POST
...
ControllerTestCase was overwriting GET and POST and not
restoring them at the end of testAction.
Fixes #2841
2012-04-30 20:36:19 -04:00
Jose Lorenzo Rodriguez
bf0f5ab118
Merge remote-tracking branch 'origin/2.1' into 2.2
2012-04-29 20:05:39 -04:30
Kyle Robinson Young
b8488b8dfe
Update 1.x @link in docblocks
2012-04-26 19:49:18 -07:00
Jose Lorenzo Rodriguez
f574e9644d
Fixed failing test case
2012-04-15 12:51:33 -04:30
Jose Lorenzo Rodriguez
16bde9c723
Making sure components in controller test cases always have a fresh reference to the request object, fixes #2705
2012-03-24 14:34:29 -04:30
Juan Basso
3b1bd90ad6
Updated copyright to 2012.
2012-03-12 22:46:07 -04:00
mark_story
c2f42343a3
Fix most coding standards issues in TestSuite/
2012-03-04 21:51:50 -05:00
Kyle Robinson Young
45ec5d73c5
Add missing visibility keywords
2012-02-16 23:13:12 -08:00
mark_story
0607437abd
Fix various failing tests.
2011-12-17 23:50:41 -05:00
Kyle Robinson Young
096ff76295
Fix overreaching Inflector when ControllerTestCase autoMocks
2011-12-12 10:29:33 -08:00
Kyle Robinson Young
4174ddff0f
Always set ControllerTestCase::testAction result variables
2011-12-02 06:19:15 -08:00
Kyle Robinson Young
8197f87dbc
Spelling and grammar fixes
2011-12-01 21:58:09 -08:00
mark_story
493ce3a442
Fix issue where REST actions were not easily testable.
...
Fixes #2198
2011-11-11 21:28:33 -05:00
mark_story
3e54ffd8c1
Defaulting autoMock to true.
...
This fixes issues with mock controllers being discarded after use.
Not always mocking controllers causes issues with using redirect().
Fixes #2200
2011-11-06 09:36:35 -05:00
mark_story
13900dc75c
Starting to fix issues with PHPUnit 3.6 compatibility.
2011-11-04 22:54:08 -04:00
Jose Lorenzo Rodriguez
3fc6d293fc
Fixing regression in ControllerTestCase after changes done in RequestHandlerComponent
2011-11-01 13:49:40 -04:30
Gun.io Whitespace Robot
4742168253
Remove whitespace [Gun.io WhitespaceBot]
2011-10-28 18:25:08 -04:00
mark_story
c5ca10ca69
Remove controller reuse between testAction() calls.
...
Reusing controllers between various testAction calls would
mean that calls that needed to render views, would break on the
second call to testAction(). Controllers are rebuilt for each testAction()
call now.
Fixes #2142
2011-10-22 10:58:21 -04:00
Renan Gonçalves
573a349209
Using plugin name on exception thrown and in templates files.
2011-10-16 13:40:36 +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
9b8c280492
Updating doc blocks.
2011-09-12 23:00:56 -04:00
Mark Story mark@mark-story.com
36eca679fe
Adding an isset so a non-existant view isn't accessed.
...
Fixes #1954
2011-09-01 17:55:42 +01:00
Jose Lorenzo Rodriguez
40ba4005bd
Affecting the REQUEST_METHOD env variable in order to ease controller testing with different http verbs
2011-08-29 16:54:22 -04:30
Juan Basso
7d0250ff47
Merge branch '2.0-api-doc' into 2.0
2011-08-26 20:22:26 -04:00
Mark Story
7276f3357d
Fixing issues where ControllerTestCase couldn't properly hit plugin
...
controllers.
Fixing some formatting.
Fixes #1918
2011-08-20 09:58:35 -04:00
Mark Story
70f47378f9
Fixing options[data] always writing its data into $_POST['data'].
...
It now just overwrites $_POST.
Fixes #1917
2011-08-20 09:46:01 -04:00
Juan Basso
f5a54d00dd
Changed methods and attributes from private to protected.
2011-08-20 00:43:34 -04:00
Jose Lorenzo Rodriguez
eaa01634b1
Making ControllerTestCase abstract, that way PHP won't complain about empty test cases, closes #1868
2011-07-30 22:05:17 -04:30
Jose Lorenzo Rodriguez
cfd2d9e00b
Updating all @package annotations in doc blocks
2011-07-26 01:46:14 -04:30
mark_story
65d28f4c73
Fixing failing tests for ControllerTestCase.
2011-07-22 20:29:44 -04:00
Juan Basso
192812ee7f
Updating the copyright to 2011.
2011-05-30 22:32:43 -04:00
Renan Gonçalves
438050dcaa
Adding 'public' visibility to all public methods.
2011-05-30 22:02:32 +02:00