public function setUp() { $mockRouter = $this->getMockBuilder('Slim\\Router')->disableOriginalConstructor()->getMock(); $this->view = new Smarty(dirname(__FILE__) . '/templates', ['compileDir' => dirname(__FILE__) . '/templates_c', 'pluginsDir' => './test']); $this->view->addSlimPlugins($mockRouter, 'base_url_test'); }