Skip to content

Instantly share code, notes, and snippets.

@icambridge
Created January 21, 2012 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icambridge/1652429 to your computer and use it in GitHub Desktop.
Save icambridge/1652429 to your computer and use it in GitHub Desktop.
Mock Controller
<?php
namespace app\tests\mocks\controllers;
use app\controllers\ArticlesController;
class MockArticlesController extends ArticlesController {
protected $_classes = array(
'media' => 'lithium\net\http\Media',
'router' => 'lithium\net\http\Router',
'response' => 'app\tests\mocks\action\MockControllerResponse',
);
public function access($varName){
return $this->{$varName};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment