Exemplo n.º 1
0
 /**
  * @depends testCheckPmaAbsoluteUriScheme
  */
 public function testCheckPmaAbsoluteUriUser()
 {
     $this->object->set('PmaAbsoluteUri', 'http://*****:*****@localhost/phpmyadmin/index.php');
     $this->object->checkPmaAbsoluteUri();
     $this->assertEquals("http://*****:*****@localhost/phpmyadmin/index.php/", $this->object->get('PmaAbsoluteUri'));
     $this->object->set('PmaAbsoluteUri', 'https://*****:*****@localhost/phpmyadmin/index.php');
     $this->object->checkPmaAbsoluteUri();
     $this->assertEquals("https://*****:*****@localhost/phpmyadmin/index.php/", $this->object->get('PmaAbsoluteUri'));
 }
Exemplo n.º 2
0
 /**
  * Test for absolute URI composition
  *
  * @depends testCheckPmaAbsoluteUri
  */
 public function testCheckPmaAbsoluteUriScheme()
 {
     $_SERVER['HTTP_HOST'] = 'localhost';
     $_SERVER['HTTP_SCHEME'] = 'http';
     $_SERVER['HTTPS'] = 'off';
     $GLOBALS['PMA_PHP_SELF'] = 'index.php';
     $this->object->set('PmaAbsoluteUri', '');
     $this->object->checkPmaAbsoluteUri();
     $this->assertEquals("http://localhost/", $this->object->get('PmaAbsoluteUri'));
 }