You are here

public function AcquiaAgentTestCase::testServerSuperglobal in Acquia Connector 7.3

Test acquia_agent_get_server_superglobal.

File

acquia_agent/tests/acquia_agent.test, line 404
Tests the functionality of the Acquia Agent module.

Class

AcquiaAgentTestCase
AcquiaAgentTestCase.

Code

public function testServerSuperglobal() {
  $server = array(
    'acquia_agent_test_string' => 'acquia_agent_test_string_value',
    'acquia_agent_test_array' => array(
      1,
      2,
      3,
    ),
    'acquia_agent_test_empty_string' => '',
    'acquia_agent_test_empty_array' => array(),
    'acquia_agent_test_null' => NULL,
  );
  $this
    ->assertIdentical(acquia_agent_get_server_superglobal(), $_SERVER, 'acquia_agent_get_server_superglobal() returns expected value');
  variable_set('acquia_agent_server_superglobal', $server);
  $this
    ->assertIdentical(acquia_agent_get_server_superglobal(), $server, 'acquia_agent_get_server_superglobal() returns expected value');
  variable_del('acquia_agent_server_superglobal');
}