$plugin
$plugin : string
Plugin name
NetCommonsControllerTestCase
__construct(string $name = null, array $data = array(), string $dataName = '') : void
Fixtures load
string | $name | The name parameter on PHPUnit_Framework_TestCase::__construct() |
array | $data | The date parameter on PHPUnit_Framework_TestCase::__construct() |
string | $dataName | The dataName parameter on PHPUnit_Framework_TestCase::__construct() |
generateNc(string $controller, array $mocks = array()) : \Controller
Generates a mocked controller and mocks any classes passed to `$mocks`. By default, `_stop()` is stubbed as is sending the response headers, so to not interfere with testing.
methods
Methods to mock on the controller. _stop()
is mocked by defaultmodels
Models to mock. Models are added to the ClassRegistry so any
time they are instantiated the mock will be created. Pass as key value pairs
with the value being specific methods on the model to mock. If true
or
no value is passed, the entire model will be mocked.components
Components to mock. Components are only mocked on this controller
and not within each other (i.e., components on components)string | $controller | Controller name |
array | $mocks | List of classes and methods to mock |
Mocked controller