Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
3 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
lib/Cake/Test/test_app/Controller/TestConfigsController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
App::uses('CakeErrorController', 'Controller'); | ||
|
||
class TestConfigsController extends CakeErrorController { | ||
|
||
public $components = array( | ||
'RequestHandler' => array( | ||
'some' => 'config' | ||
) | ||
); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters