public function Util_ConfigurationTest::testPHPConfigurationIsHandledCorrectly

@backupGlobals enabled

File

drupal/core/vendor/phpunit/phpunit/Tests/Util/ConfigurationTest.php, line 273

Class

Util_ConfigurationTest
@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 testPHPConfigurationIsHandledCorrectly() {
  $this->configuration
    ->handlePHPConfiguration();
  $path = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . '.' . PATH_SEPARATOR . '/path/to/lib';
  $this
    ->assertStringStartsWith($path, ini_get('include_path'));
  $this
    ->assertEquals(FALSE, FOO);
  $this
    ->assertEquals(TRUE, BAR);
  $this
    ->assertEquals(FALSE, $GLOBALS['foo']);
  $this
    ->assertEquals(TRUE, $_ENV['foo']);
  $this
    ->assertEquals(TRUE, getenv('foo'));
  $this
    ->assertEquals('bar', $_POST['foo']);
  $this
    ->assertEquals('bar', $_GET['foo']);
  $this
    ->assertEquals('bar', $_COOKIE['foo']);
  $this
    ->assertEquals('bar', $_SERVER['foo']);
  $this
    ->assertEquals('bar', $_FILES['foo']);
  $this
    ->assertEquals('bar', $_REQUEST['foo']);
}