* @author Magnus Rosenbaum <*****@*****.**>
 * @package Basisentscheid
 */


if ( $dir = dirname($_SERVER['argv'][0]) ) chdir($dir);
const DOCROOT = "../";
require "../inc/common_cli.php";

require "../inc/functions_test.php";


// to avoid conflicts with existing usernames
$date = dechex(time());

$ngroup = new_ngroup("Test ballots group", 500, 25);

// create main member
$login = new Member;
$login->invite = Login::generate_token(24);
$login->eligible = true;
$login->verified = true;
$login->create();
$login->username = "******".$date."login";
$login->password = $password;
$login->mail = ERROR_MAIL;
$login->update(['username', 'password', 'eligible', 'mail'], 'activated=now()');


// go through all cases
$case = 0;
/**
 * generate test data
 *
 * @author Magnus Rosenbaum <*****@*****.**>
 * @package Basisentscheid
 */


if ( $dir = dirname($_SERVER['argv'][0]) ) chdir($dir);
const DOCROOT = "../";
require "../inc/common_cli.php";

require "../inc/functions_test.php";


$ngroup = new_ngroup("Test group", 500, 25);

// to avoid conflicts with existing usernames
$date = dechex(time());

// create main member
create_member("t".$date."login");
$login = Login::$member;

$bcase = array(1=>0, 2=>0, 3=>0, 4=>0);
// read start branches from command line
foreach ( $_SERVER['argv'] as $key => $value ) {
	if ($key==0) continue;
	$bcase[$key] = $value;
}