summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcarl <>2007-08-05 20:10:28 +0000
committercarl <>2007-08-05 20:10:28 +0000
commit6194e91a9431e925fd44ca539fde718727469545 (patch)
tree0df3a56a8827177af6ce18d976adb2c0147275d9
parent19f7932e9d620ee324498860cead3c2ffb4db590 (diff)
fixed THttpRequestTest to work with Qiangs latest changes
-rw-r--r--tests/unit/Web/THttpRequestTest.php23
1 files changed, 2 insertions, 21 deletions
diff --git a/tests/unit/Web/THttpRequestTest.php b/tests/unit/Web/THttpRequestTest.php
index f44c5842..a73711e4 100644
--- a/tests/unit/Web/THttpRequestTest.php
+++ b/tests/unit/Web/THttpRequestTest.php
@@ -131,11 +131,6 @@ class THttpRequestTest extends PHPUnit_Framework_TestCase {
self::assertEquals('GET', $request->getRequestType());
}
- public function testGetForceSecureConnection() {
- $request = new THttpRequest();
- self::assertEquals(null,$request->getForceSecureConnection());
- }
-
public function testGetIsSecureConnection() {
$request = new THttpRequest();
self::assertEquals(false, $request->getIsSecureConnection());
@@ -299,15 +294,6 @@ class THttpRequestTest extends PHPUnit_Framework_TestCase {
$request->init (null);
self::assertEquals($_ENV, $request->getEnvironmentVariables());
}
-
- public function testSetForceSecureConnection() {
- $request = new THttpRequest();
- $request->init(null);
- $request->setForceSecureConnection(false);
- self::assertEquals(false,$request->getForceSecureConnection());
- $request->setForceSecureConnection(true);
- self::assertEquals(true,$request->getForceSecureConnection());
- }
public function testConstructUrl() {
$request = new THttpRequest ();
@@ -318,14 +304,9 @@ class THttpRequestTest extends PHPUnit_Framework_TestCase {
// Try without encode &
$url=$request->constructURL('page','Home',array('param1'=>'value1','param2'=>'value2'), false);
self::assertEquals('/demos/personal/index.php?page=Home&param1=value1&param2=value2', $url);
- // Try with ForceSecureConnection = true
- $request->setForceSecureConnection(true);
- $url=$request->constructURL('page','Home',array('param1'=>'value1','param2'=>'value2'), false);
+ // Try to use HTTPS even if the current request is sent via HTTP
+ $url=$request->constructURL('page','Home',array('param1'=>'value1','param2'=>'value2'), false, false, true);
self::assertEquals('https', substr($url,0,5));
- // Try with ForceSecureConnection = false
- $request->setForceSecureConnection(false);
- $url=$request->constructURL('page','Home',array('param1'=>'value1','param2'=>'value2'), false);
- self::assertEquals('http',substr($url,0,4));
}
public function testSetServiceID() {