$l = readline('Are you sure you want to reset the DB?' . PHP_EOL); $l = readline('Reset the DB?' . PHP_EOL); if ('yyy' != $l) { print 'Never reset the DB.' . PHP_EOL; exit(1); } $rootDBUtilsTest = new RootDBUtilsTest(); $rootDBUtilsTest->setupWebDBUser(); $rootDBUtilsTest->setupUserDB(); $rootDBUtilsTest->setupPlaylistDB(); $rootDBUtilsTest->setupStreamDB(); $rootDBUtilsTest->setupWebDBUserRights(); $roleUtilsTest = new RoleUtilsTest(); $roleUtilsTest->addRoles(); RoleUtils::getInstance()->load(); $webDBUtilsTest = new WebDBUtilsTest(); $webDBUtilsTest->addMockUser('*****@*****.**', 'admin'); $webDBUtilsTest->linkMockUser('*****@*****.**', RoleUtils::ADMIN); $webDBUtilsTest->linkMockUser('*****@*****.**', RoleUtils::TENANT); $webDBUtilsTest->linkMockUser('*****@*****.**', RoleUtils::GUEST); $webDBUtilsTest->listRolesOfUser('*****@*****.**'); $webDBUtilsTest->addMockUser('*****@*****.**', 'test'); $webDBUtilsTest->linkMockUser('*****@*****.**', RoleUtils::TENANT); $webDBUtilsTest->listRolesOfUser('*****@*****.**'); $webDBUtilsTest->addMockUser('*****@*****.**', 'test'); $webDBUtilsTest->linkMockUser('*****@*****.**', RoleUtils::TENANT); $webDBUtilsTest->listRolesOfUser('*****@*****.**'); $webDBUtilsTest->addStream('radio.0.mp3'); $webDBUtilsTest->addStream('radio.1.mp3'); $webDBUtilsTest->addStream('radio.2.mp3'); $webDBUtilsTest->addStream('radio.3.mp3');
<?php require_once '../de/appwerk/radio/Session.php'; require_once '../de/appwerk/radio/test/RootDBUtilsTest.php'; require_once '../de/appwerk/radio/test/WebDBUtilsTest.php'; Session::getInstance(); $rootDBUtilsTest = new RootDBUtilsTest(); $webDBUtilsTest = new WebDBUtilsTest(); $rootDBUtilsTest->appendScreens(); $rootDBUtilsTest->appendScreenProcedures(); $webDBUtilsTest->addMockScreen(); $webDBUtilsTest->listScreens(); exit(1);
<?php require_once '../de/appwerk/radio/Session.php'; require_once '../de/appwerk/radio/test/RootDBUtilsTest.php'; require_once '../de/appwerk/radio/test/WebDBUtilsTest.php'; Session::getInstance(); $rootDBUtilsTest = new RootDBUtilsTest(); $webDBUtilsTest = new WebDBUtilsTest(); $rootDBUtilsTest->appendPolicies(); $rootDBUtilsTest->appendPolicyProcedures(); $webDBUtilsTest->setPolicies(); exit(1);