コード例 #1
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     $this->saveFactoryState();
     $this->object = JSession::getInstance('none', array('expire' => 20, 'force_ssl' => true, 'name' => 'name', 'id' => 'id', 'security' => 'security'));
     $this->input = new JInput();
     $this->input->cookie = $this->getMock('JInputCookie', array('set', 'get'));
     $this->object->initialise($this->input);
     $this->input->cookie->expects($this->any())->method('set');
     $this->input->cookie->expects($this->any())->method('get')->will($this->returnValue(null));
     $this->object->start();
 }
コード例 #2
0
ファイル: JSessionTest.php プロジェクト: N6REJ/joomla-cms
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->saveFactoryState();
     $handler = new JSessionHandlerArray(md5('PHPSESSID'));
     $config = array('expire' => 20, 'force_ssl' => true, 'name' => 'PHPSESSID', 'security' => 'security');
     $this->object = JSession::getInstance('none', $config, $handler);
     $this->input = new JInput();
     $this->input->cookie = $this->getMock('JInputCookie', array('set', 'get'));
     $this->object->initialise($this->input);
     $this->input->cookie->expects($this->any())->method('set');
     $this->input->cookie->expects($this->any())->method('get')->will($this->returnValue(null));
     $this->object->start();
 }
コード例 #3
0
ファイル: JSessionTest.php プロジェクト: ForAEdesWeb/AEW3
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return void
  */
 protected function setUp()
 {
     if (!class_exists('JSession')) {
         $this->markTestSkipped('The JSession class does not exist.');
     }
     // TODO: This code logic appears useless, many missing methods are being called.  Review.
     parent::setUp();
     $this->saveFactoryState();
     $this->object = JSession::getInstance('none', array('expire' => 20, 'force_ssl' => true, 'name' => 'name', 'id' => 'id', 'security' => 'security'));
     $this->input = new JInput();
     $this->input->cookie = $this->getMock('JInputCookie', array('set', 'get'));
     $this->object->initialise($this->input);
     $this->input->cookie->expects($this->any())->method('set');
     $this->input->cookie->expects($this->any())->method('get')->will($this->returnValue(null));
     $this->object->start();
 }