From fe06b4ccd8faa23ebc2b67147fc9064b785a675b Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 2 Jul 2008 20:05:11 +0000 Subject: - Patch #276581 by catch: wrote missing tests for contact module and simplified contact module thanks to that. Also removed some whitespace. --- includes/tests/bootstrap.test | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'includes/tests/bootstrap.test') diff --git a/includes/tests/bootstrap.test b/includes/tests/bootstrap.test index beb94edf0..4b2cf3089 100644 --- a/includes/tests/bootstrap.test +++ b/includes/tests/bootstrap.test @@ -24,14 +24,14 @@ class BootstrapIPAddressTestCase extends DrupalWebTestCase { $this->forwarded_ip = '127.0.0.3'; $this->cluster_ip = '127.0.0.4'; $this->untrusted_ip = '0.0.0.0'; - + $_SERVER['REMOTE_ADDR'] = $this->remote_ip; unset($_SERVER['HTTP_X_FORWARDED_FOR']); unset($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']); - + parent::setUp(); } - + /** * Implementation of tearDown(). */ @@ -49,14 +49,14 @@ class BootstrapIPAddressTestCase extends DrupalWebTestCase { ip_address(true) == $this->remote_ip, t('Got remote IP address') ); - + // Proxy forwarding on but no proxy addresses defined. variable_set('reverse_proxy', 1); $this->assertTrue( ip_address(true) == $this->remote_ip, t('Proxy forwarding without trusted proxies got remote IP address') ); - + // Proxy forwarding on and proxy address not trusted. variable_set('reverse_proxy_addresses', array($this->proxy_ip)); $_SERVER['REMOTE_ADDR'] = $this->untrusted_ip; @@ -71,8 +71,8 @@ class BootstrapIPAddressTestCase extends DrupalWebTestCase { $this->assertTrue( ip_address(true) == $this->forwarded_ip, t('Proxy forwarding with trusted proxy got forwarded IP address') - ); - + ); + // Cluster environment. $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'] = $this->cluster_ip; $this->assertTrue( -- cgit v1.2.3