You are here

function oauth2_client_test_boot in OAuth2 Client 7

Same name and namespace in other branches
  1. 8 tests/oauth2_client_test/oauth2_client_test.module \oauth2_client_test_boot()
  2. 7.2 tests/oauth2_client_test.module \oauth2_client_test_boot()

Implements hook_boot().

Outputs debug information to the file: /tmp/btr.log

File

tests/oauth2_client_test.module, line 12
Testing OAuth2 client functionality.

Code

function oauth2_client_test_boot() {
  function _oauth2_client_test_log($var, $comment = '') {
    $file = '/tmp/btr.log';
    $content = "\n==> {$comment}: " . print_r($var, true);
    file_put_contents($file, $content, FILE_APPEND);
  }
  _oauth2_client_test_log('= = = = = = = = = = = = = = = = = = = = = = =');
  _oauth2_client_test_log($_GET, '$_GET');
  _oauth2_client_test_log($_POST, '$_POST');
  if (isset($_SESSION['oauth2_client'])) {
    _oauth2_client_test_log($_SESSION['oauth2_client'], '$_SESSION[oauth2_client]');
  }
}