コード例 #1
0
ファイル: CBV.php プロジェクト: Telephonic/community-scripts
         exit(-1);
     }
 }
 $acct = $XBAR->get_account($realm_id);
 //Sanity check
 if ($TEMPLATE['realm'] != $acct['realm']) {
     printf("{$bldred}FATAL: {$bldwht}Response failed sanity check {$bldwht}( {$bldpur}possibly developers sanity too {$bldwht}){$txtrst}\n");
     exit(-1);
 }
 $TEMPLATE = array();
 $TEMPLATE['name'] = $acct['name'];
 $TEMPLATE['realm'] = $acct['realm'];
 $TEMPLATE['owner_id'] = $acct['owner_id'];
 $TEMPLATE['timezone'] = "America/Vancouver";
 printf("{$bldblu}TEST: Account Update{$txtrst}\n");
 $resp = $XBAR->post_account($TEMPLATE, $realm_id);
 if ($resp['status'] == 'success') {
     printf("{$bldgrn}PASS: Account Update Returned Success{$txtrst}\n\n");
     $acct = $XBAR->get_account($realm_id);
     /*
     	May need to change this test to make sure 
     	it's not the original/default value America/LosAngles I think
     */
     if ($acct['timezone'] != "America/Vancouver") {
         printf("{$bldred}FAIL: Response failed sanity check {$bldwht}({$bldpur}possibly developers sanity too {$bldwht}){$txtrst}\n\n");
     }
 } else {
     printf("{$bldred}FAIL: Account Update Failed{$txtrst}\n\n");
 }
 printf("{$bldblu}TEST: Delete Account{$txtrst}\n");
 $resp = $XBAR->del_account($realm_id);