/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { $this->response = $this->getMockBuilder('\\thebuggenie\\core\\framework\\Response')->setMethods(array('setHttpStatus', 'setContentType', 'setDecoration', 'renderText', 'renderComponent', 'setTemplate'))->getMock(); $this->i18n = $this->getMockBuilder('\\thebuggenie\\core\\framework\\I18n')->disableOriginalConstructor()->setMethods(array('__', 'getCharset'))->getMock(); $this->i18n->method('__')->will($this->returnArgument(0)); $this->i18n->method('getCharset')->will($this->returnValue('utf-8')); $this->object = $this->getMockBuilder('\\thebuggenie\\core\\modules\\configuration\\Actions')->setMethods(array('getResponse', 'getI18n', 'renderJSON'))->getMock(); $this->object->method('getResponse')->willReturn($this->response); $this->object->method('renderJSON')->willReturn($this->returnArgument(0)); $this->object->method('getI18n')->willReturn($this->i18n); }