3 * @runTestsInSeparateProcesses
4 * @preserveGlobalState enabled
6 class Issue1335Test extends PHPUnit_Framework_TestCase
8 public function testGlobalString()
10 $this->assertEquals('Hello', $GLOBALS['globalString']);
13 public function testGlobalIntTruthy()
15 $this->assertEquals(1, $GLOBALS['globalIntTruthy']);
18 public function testGlobalIntFalsey()
20 $this->assertEquals(0, $GLOBALS['globalIntFalsey']);
23 public function testGlobalFloat()
25 $this->assertEquals(1.123, $GLOBALS['globalFloat']);
28 public function testGlobalBoolTrue()
30 $this->assertEquals(true, $GLOBALS['globalBoolTrue']);
33 public function testGlobalBoolFalse()
35 $this->assertEquals(false, $GLOBALS['globalBoolFalse']);
38 public function testGlobalNull()
40 $this->assertEquals(null, $GLOBALS['globalNull']);
43 public function testGlobalArray()
45 $this->assertEquals(array('foo'), $GLOBALS['globalArray']);
48 public function testGlobalNestedArray()
50 $this->assertEquals(array(array('foo')), $GLOBALS['globalNestedArray']);
53 public function testGlobalObject()
55 $this->assertEquals((object) array('foo'=> 'bar'), $GLOBALS['globalObject']);
58 public function testGlobalObjectWithBackSlashString()
60 $this->assertEquals((object) array('foo'=> 'back\\slash'), $GLOBALS['globalObjectWithBackSlashString']);
63 public function testGlobalObjectWithDoubleBackSlashString()
65 $this->assertEquals((object) array('foo'=> 'back\\\\slash'), $GLOBALS['globalObjectWithDoubleBackSlashString']);