<?php namespace Shibboleth; /** * @license see /license.txt * @author Laurent Opprecht <*****@*****.**>, Nicolas Rod for the University of Geneva */ include_once dirname(__FILE__) . '/../init.php'; if (!ShibbolethTest::is_enabled()) { echo 'This is not a test server'; die; } Shibboleth::session()->logout(); ShibbolethTest::helper()->setup_new_student_no_email(); require_once dirname(__FILE__) . '/../login.php';
<?php namespace Shibboleth; /** * Run unit tests. Server needs to be a test server to run those. * * @license see /license.txt * @author Laurent Opprecht <*****@*****.**>, Nicolas Rod for the University of Geneva */ include_once dirname(__FILE__) . '/../init.php'; if (!ShibbolethTest::is_enabled()) { echo 'This is not a test server'; die; } echo 'Test started<br/>-------------------<br/>'; ShibbolethTest::test_new_teacher(); ShibbolethTest::test_new_student(); ShibbolethTest::test_update_teacher(); ShibbolethTest::test_new_student_multiple_givenname(); ShibbolethTest::test_new_no_affiliation_default(); ShibbolethTest::test_new_staff(); ShibbolethTest::test_new_infer_status_request(); echo '-------------------<br/>Done!';
<?php namespace Shibboleth; /** * Scaffold script. Generates the required database models for the Shibboleth * plugin. * * Will only run when the server is a test server. * * @license see /license.txt * @author Laurent Opprecht <*****@*****.**>, Nicolas Rod for the University of Geneva */ $dir = dirname(__FILE__); include_once $dir . '/../init.php'; include_once $dir . '/../app/lib/scaffolder/scaffolder.class.php'; if (!ShibbolethTest::is_enabled()) { echo 'This is not a test server'; die; } if (!Shibboleth::session()->is_logged_in()) { echo 'Not authorized'; die; } $name = 'user'; $result = Scaffolder::instance()->scaffold($name); file_put_contents("{$dir}/output/{$name}.class.php", $result); header('content-type: text/plain'); echo $result;