Yaffs site version 1.1
[yaffs-website] / vendor / phpunit / phpunit / tests / Regression / GitHub / 1335 / Issue1335Test.php
1 <?php
2 /**
3  * @runTestsInSeparateProcesses
4  * @preserveGlobalState enabled
5  */
6 class Issue1335Test extends PHPUnit_Framework_TestCase
7 {
8     public function testGlobalString()
9     {
10         $this->assertEquals('Hello', $GLOBALS['globalString']);
11     }
12
13     public function testGlobalIntTruthy()
14     {
15         $this->assertEquals(1, $GLOBALS['globalIntTruthy']);
16     }
17
18     public function testGlobalIntFalsey()
19     {
20         $this->assertEquals(0, $GLOBALS['globalIntFalsey']);
21     }
22
23     public function testGlobalFloat()
24     {
25         $this->assertEquals(1.123, $GLOBALS['globalFloat']);
26     }
27
28     public function testGlobalBoolTrue()
29     {
30         $this->assertEquals(true, $GLOBALS['globalBoolTrue']);
31     }
32
33     public function testGlobalBoolFalse()
34     {
35         $this->assertEquals(false, $GLOBALS['globalBoolFalse']);
36     }
37
38     public function testGlobalNull()
39     {
40         $this->assertEquals(null, $GLOBALS['globalNull']);
41     }
42
43     public function testGlobalArray()
44     {
45         $this->assertEquals(array('foo'), $GLOBALS['globalArray']);
46     }
47
48     public function testGlobalNestedArray()
49     {
50         $this->assertEquals(array(array('foo')), $GLOBALS['globalNestedArray']);
51     }
52
53     public function testGlobalObject()
54     {
55         $this->assertEquals((object) array('foo'=> 'bar'), $GLOBALS['globalObject']);
56     }
57
58     public function testGlobalObjectWithBackSlashString()
59     {
60         $this->assertEquals((object) array('foo'=> 'back\\slash'), $GLOBALS['globalObjectWithBackSlashString']);
61     }
62
63     public function testGlobalObjectWithDoubleBackSlashString()
64     {
65         $this->assertEquals((object) array('foo'=> 'back\\\\slash'), $GLOBALS['globalObjectWithDoubleBackSlashString']);
66     }
67 }