public function Framework_TestCaseTest::testGlobalsBackupPost

File

drupal/core/vendor/phpunit/phpunit/Tests/Framework/TestCaseTest.php, line 282

Class

Framework_TestCaseTest
@package PHPUnit @author Sebastian Bergmann <sebastian@phpunit.de> @copyright 2001-2013 Sebastian Bergmann <sebastian@phpunit.de> @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License @link …

Code

public function testGlobalsBackupPost() {
  global $a;
  global $i;
  $this
    ->assertEquals('a', $a);
  $this
    ->assertEquals('a', $GLOBALS['a']);
  $this
    ->assertEquals('b', $_ENV['b']);
  $this
    ->assertEquals('c', $_POST['c']);
  $this
    ->assertEquals('d', $_GET['d']);
  $this
    ->assertEquals('e', $_COOKIE['e']);
  $this
    ->assertEquals('f', $_SERVER['f']);
  $this
    ->assertEquals('g', $_FILES['g']);
  $this
    ->assertEquals('h', $_REQUEST['h']);
  $this
    ->assertEquals('ii', $i);
  $this
    ->assertEquals('ii', $GLOBALS['i']);
  $this
    ->assertArrayNotHasKey('foo', $GLOBALS);
}