FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
test_common_auth.php
Go to the documentation of this file.
1 <?php
2 /*
3  Copyright (C) 2011 Hewlett-Packard Development Company, L.P.
4 
5  This program is free software; you can redistribute it and/or
6  modify it under the terms of the GNU General Public License
7  version 2 as published by the Free Software Foundation.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License along
15  with this program; if not, write to the Free Software Foundation, Inc.,
16  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  */
18 
24 require_once(dirname(__FILE__) . '/../common-auth.php');
25 
29 class test_common_auth extends \PHPUnit\Framework\TestCase
30 {
31  /* initialization */
32  protected function setUp()
33  {
34  print "Starting unit test for common-auth.php\n";
35  }
36 
41  {
42  $_SERVER['HTTP_SMUNIVERSALID'] = null;
43  $result = siteminder_check();
44  $this->assertEquals("-1", $result );
45  $_SERVER['HTTP_SMUNIVERSALID'] = "Test Siteminder";
46  $result = siteminder_check();
47  $this->assertEquals("Test Siteminder", $result);
48  }
49 
50 
54  protected function tearDown()
55  {
56  print "Ending unit test for common-auth.php\n";
57  }
58 }
tearDown()
clean the env
test_siteminder_check()
test for siteminder_check()
siteminder_check()
Check if SiteMinder is enabled.
Definition: common-auth.php:33