protected function _setup()
{
$this->Task->expects($this->any())->method('getControllerList')->with(null)->will($this->returnCallback(function ($plugin, $prefix) {
if ($prefix === null) {
return ['CommentsController.php', 'PostsController.php', 'BigLongNamesController.php'];
} else {
return ['PostsController.php', 'BigLongNamesController.php'];
}
}));
$this->Task->startup();
}