public function setUp() { $script = $this->getMock('SlmGoogleAnalytics\\View\\Helper\\Script\\ScriptInterface'); $script->expects($this->any())->method('getCode')->will($this->returnValue('foo')); $helper = new Helper($script); $view = new PhpRenderer(); $helper->setView($view); $this->helper = $helper; }