summaryrefslogtreecommitdiff
path: root/_testing/tests/testing/inttests_globals.test.php
diff options
context:
space:
mode:
Diffstat (limited to '_testing/tests/testing/inttests_globals.test.php')
-rw-r--r--_testing/tests/testing/inttests_globals.test.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/_testing/tests/testing/inttests_globals.test.php b/_testing/tests/testing/inttests_globals.test.php
new file mode 100644
index 000000000..40237d704
--- /dev/null
+++ b/_testing/tests/testing/inttests_globals.test.php
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * @group integration
+ */
+class InttestsGlobalsTest extends PHPUnit_Framework_TestCase {
+ /**
+ * Global variables should be restored for every test case.
+ */
+ function testFirstRun() {
+ $this->assertEquals('173.194.69.138', $_SERVER['REMOTE_ADDR'], 'Global var not set as expected');
+
+ $_SERVER['REMOTE_ADDR'] = '127.0.0.1';
+ }
+
+ /**
+ * @depends testFirstRun
+ */
+ function testSecondRun() {
+ $this->assertEquals('173.194.69.138', $_SERVER['REMOTE_ADDR'], 'Global var not set as expected');
+ }
+}