예제 #1
0
 /**
  * Tests the populateState method.
  *
  * @since   3.4
  *
  * @return  void
  *
  * @testdox getUserState() supports the resetPage attribute
  */
 public function testGetuserstateSupportsResetPage()
 {
     // Set up a Mock for JApplicationCms
     $applicationMock = $this->getMockCmsApp();
     $applicationMock->method('getUserState')->with($this->equalTo('state.key'))->will($this->returnValue(null));
     $applicationMock->input = new JInput(array());
     $applicationMock->input->set('request.key', 'requestValue');
     JFactory::$application = $applicationMock;
     $this->object->getUserStateFromRequest('state.key', 'request.key', 'defaultValue', 'none', true);
     $this->assertEquals(0, JFactory::getApplication()->input->get('limistart'));
 }