/**
  * Tests the findOption() method simulating the option at a special value.
  */
 public function testFindOptionCanLoginAdminOptionSet()
 {
     $user = $this->getMock('JUser', array('get', 'authorise'));
     $user->expects($this->once())->method('get')->with($this->equalTo('guest'))->willReturn(false);
     $user->expects($this->once())->method('authorise')->with($this->equalTo('core.login.admin'))->willReturn(false);
     $this->class->loadIdentity($user);
     $this->class->input->set('option', 'foo');
     $this->assertEquals('com_login', $this->class->findOption());
     $this->assertEquals('com_login', JFactory::$application->input->get('option'));
 }