예제 #1
0
//
// Authors:
//  Loic Dachary <*****@*****.**>
//  Morgan Manach <*****@*****.**>
//
require_once 'constants.php';
require_once 'lib_filters.php';
require_once 'poker.php';
$hci_header_showed = false;
function hci_header()
{
    require_once _cst_header;
}
function hci_footer()
{
    require_once _cst_footer;
}
function no_auth_handler($name, $referer)
{
    header('Location: login.php?name=' . $name . '&referer=' . urlencode($referer));
    die;
}
try {
    $poker = new poker(_cst_poker_soap_host);
} catch (Exception $e) {
    print "<h3>" . $e->getMessage() . "</h3d>";
    die;
}
$poker->setNoAuthHandler('no_auth_handler');
$poker->setTimeoutCookie(_cst_timeout_cookie);
예제 #2
0
 public function test01_login()
 {
     $poker = new poker('fakehost');
     $poker->verbose = VERBOSE;
     $poker->setTimeoutCookie('5');
     $poker->login('user', 'password');
     $this->assertNotEquals(false, $poker->isLoggedIn());
 }