From c8b98f1446da1517c7023afad2bbb92d26d7efa6 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 16 Jan 2013 12:13:25 +0100 Subject: [PATCH] Adding user manager tests --- main/inc/lib/usermanager.lib.php | 34 +- tests/phpunit/classes/UserManagerTest.lib.php | 378 ++++++++---------- 2 files changed, 194 insertions(+), 218 deletions(-) diff --git a/main/inc/lib/usermanager.lib.php b/main/inc/lib/usermanager.lib.php index 3e482f2429..18f3d97239 100644 --- a/main/inc/lib/usermanager.lib.php +++ b/main/inc/lib/usermanager.lib.php @@ -376,23 +376,23 @@ class UserManager { * @assert ('abc') === false */ public static function can_delete_user($user_id) { - global $_configuration; - if (isset($_configuration['delete_users']) && $_configuration['delete_users'] == false) { - return false; - } - $table_course_user = Database :: get_main_table(TABLE_MAIN_COURSE_USER); - if ($user_id != strval(intval($user_id))) return false; - if ($user_id === false) return false; - $sql = "SELECT * FROM $table_course_user WHERE status = '1' AND user_id = '".$user_id."'"; - $res = Database::query($sql); - while ($course = Database::fetch_object($res)) { - $sql = "SELECT user_id FROM $table_course_user WHERE status='1' AND course_code ='".Database::escape_string($course->course_code)."'"; - $res2 = Database::query($sql); - if (Database::num_rows($res2) == 1) { - return false; - } - } - return true; + global $_configuration; + if (isset($_configuration['delete_users']) && $_configuration['delete_users'] == false) { + return false; + } + $table_course_user = Database :: get_main_table(TABLE_MAIN_COURSE_USER); + if ($user_id != strval(intval($user_id))) return false; + if ($user_id === false) return false; + $sql = "SELECT * FROM $table_course_user WHERE status = '1' AND user_id = '".$user_id."'"; + $res = Database::query($sql); + while ($course = Database::fetch_object($res)) { + $sql = "SELECT user_id FROM $table_course_user WHERE status='1' AND course_code ='".Database::escape_string($course->course_code)."'"; + $res2 = Database::query($sql); + if (Database::num_rows($res2) == 1) { + return false; + } + } + return true; } /** diff --git a/tests/phpunit/classes/UserManagerTest.lib.php b/tests/phpunit/classes/UserManagerTest.lib.php index d92f4bea2c..a311e32038 100644 --- a/tests/phpunit/classes/UserManagerTest.lib.php +++ b/tests/phpunit/classes/UserManagerTest.lib.php @@ -1,4 +1,5 @@ 1. + * Generated from @assert ('') === false. * - * @covers UserManager::create_user + * @covers UserManager::is_username_available */ - public function testCreate_user() + public function testIs_username_available() { - $this->assertGreaterThan( - 1, - UserManager::create_user('Sam','Gamegie',5,'sam@example.com','jo','jo') + $this->assertSame( + false, UserManager::is_username_available('') + ); + + $unique_id = uniqid(); + $this->assertSame( + true, UserManager::is_username_available($unique_id) ); } /** - * Generated from @assert ('Pippin','Took',null,null,'jo','jo') === false. - * - * @covers UserManager::create_user + * @depends testIs_username_available */ - public function testCreate_user2() + public function testIs_username_available2() { $this->assertSame( - false, - UserManager::create_user('Pippin','Took',null,null,'jo','jo') + true, UserManager::is_username_available('jmontoya666') ); } /** - * Generated from @assert (null) === false. * - * @covers UserManager::can_delete_user + * @covers UserManager::create_user + * @depends testIs_username_available2 */ - /* - public function testCan_delete_user() + public function testCreate_user() { - $this->assertSame( - false, - UserManager::can_delete_user(null) + $user_id = UserManager::create_user('julio', 'montoya', 5, 'julio@example.com', 'jmontoya666', 'jmontoya666'); + $this->assertGreaterThan( + 1, $user_id ); } - */ + /** - * Generated from @assert (-1) === false. - * - * @covers UserManager::can_delete_user + * @dataProvider customUser + * @covers UserManager::create_user */ - public function testCan_delete_user2() + public function testCreate_user2($firstname, $lastname, $status, $email, $username, $password) { $this->assertSame( - false, - UserManager::can_delete_user(-1) + false, UserManager::create_user($firstname, $lastname, $status, $email, $username, $password) ); } /** - * Generated from @assert ('abc') === false. - * - * @covers UserManager::can_delete_user + * @covers UserManager::get_user_info + * @depends testCreate_user2 */ - public function testCan_delete_user3() + public function testGet_user_info() { - $this->assertSame( - false, - UserManager::can_delete_user('abc') + $user_info = UserManager::get_user_info('jmontoya666'); + $this->assertGreaterThan( + 1, $user_info['user_id'] ); } /** - * Generated from @assert (null) === false. - * * @covers UserManager::delete_user */ public function testDelete_user() { $this->assertSame( - false, - UserManager::delete_user(null) + false, UserManager::delete_user(null) + ); + + $this->assertSame( + false, UserManager::delete_user('abc') + ); + + $this->assertSame( + false, UserManager::delete_users(-1) + ); + + $this->assertSame( + false, UserManager::delete_users(array(-1)) + ); + + $this->assertSame( + false, UserManager::delete_users(null) ); } /** - * Generated from @assert ('abc') === false. - * - * @covers UserManager::delete_user + * @depends testGet_user_info */ public function testDelete_user2() { + $user_info = UserManager::get_user_info('jmontoya666'); $this->assertSame( - false, - UserManager::delete_user('abc') + false, UserManager::delete_user($user_info['user_id']) ); } /** - * Generated from @assert (null) === false. + * Generated from @assert (-1) === false. * - * @covers UserManager::delete_users + * @covers UserManager::can_delete_user */ - public function testDelete_users() + public function testCan_delete_user2() { $this->assertSame( - false, - UserManager::delete_users(null) + false, UserManager::can_delete_user(-1) ); } /** - * Generated from @assert (-1) === false. + * Generated from @assert ('abc') === false. * - * @covers UserManager::delete_users + * @covers UserManager::can_delete_user */ - public function testDelete_users2() + public function testCan_delete_user3() { $this->assertSame( - false, - UserManager::delete_users(-1) + false, UserManager::can_delete_user('abc') ); } + + + + /** - * Generated from @assert (array(-1)) === false. * * @covers UserManager::delete_users + * @depends testDelete_user */ - public function testDelete_users3() + public function testDelete_users2() { + $new_user_id = UserManager::create_user('julio', 'montoya', STUDENT, 'julio@example.com', 'jmontoya666', 'jmontoya'); + UserManager::delete_user($new_user_id); + $user_info = api_get_user_info($new_user_id); $this->assertSame( - false, - UserManager::delete_users(array(-1)) + false, $user_info ); } @@ -166,8 +187,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase public function testDeactivate_users() { $this->assertSame( - false, - UserManager::deactivate_users(null) + false, UserManager::deactivate_users(null) ); } @@ -179,8 +199,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase public function testDeactivate_users2() { $this->assertSame( - false, - UserManager::deactivate_users(array(-1)) + false, UserManager::deactivate_users(array(-1)) ); } @@ -192,8 +211,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase public function testActivate_users() { $this->assertSame( - false, - UserManager::activate_users(null) + false, UserManager::activate_users(null) ); } @@ -205,8 +223,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase public function testActivate_users2() { $this->assertSame( - false, - UserManager::activate_users(array(-1)) + false, UserManager::activate_users(array(-1)) ); } @@ -218,8 +235,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase public function testUpdate_openid() { $this->assertSame( - false, - UserManager::update_openid(false,'') + false, UserManager::update_openid(false, '') ); } @@ -231,8 +247,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase public function testUpdate_openid2() { $this->assertSame( - false, - UserManager::update_openid(-1,'') + false, UserManager::update_openid(-1, '') ); } @@ -244,8 +259,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase public function testUpdate_user() { $this->assertSame( - false, - UserManager::update_user(false) + false, UserManager::update_user(false) ); } @@ -257,8 +271,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase public function testDisable() { $this->assertSame( - false, - UserManager::disable(0) + false, UserManager::disable(0) ); } @@ -270,8 +283,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase public function testEnable() { $this->assertSame( - false, - UserManager::enable(0) + false, UserManager::enable(0) ); } @@ -283,36 +295,11 @@ class UserManagerTest extends PHPUnit_Framework_TestCase public function testGet_user_id_from_original_id() { $this->assertSame( - 0, - UserManager::get_user_id_from_original_id('0','---') + 0, UserManager::get_user_id_from_original_id('0', '---') ); } - /** - * Generated from @assert ('') === false. - * - * @covers UserManager::is_username_available - */ - public function testIs_username_available() - { - $this->assertSame( - false, - UserManager::is_username_available('') - ); - } - /** - * Generated from @assert ('xyzxyzxyz') === true. - * - * @covers UserManager::is_username_available - */ - public function testIs_username_available2() - { - $this->assertSame( - true, - UserManager::is_username_available('xyzxyzxyz') - ); - } /** * Generated from @assert ('','') === false. @@ -322,8 +309,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase public function testCreate_username() { $this->assertSame( - false, - UserManager::create_username('','') + 'user', UserManager::create_username('', '') ); } @@ -335,8 +321,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase public function testCreate_username2() { $this->assertSame( - 'ab', - UserManager::create_username('a','b') + 'ab', UserManager::create_username('a', 'b') ); } @@ -348,7 +333,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -360,7 +345,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -372,7 +357,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -384,7 +369,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -396,7 +381,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -408,7 +393,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -420,7 +405,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -432,7 +417,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -444,21 +429,10 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } - /** - * @covers UserManager::get_user_info - * @todo Implement testGet_user_info(). - */ - public function testGet_user_info() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } /** * @covers UserManager::get_user_info_by_id @@ -468,7 +442,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -480,7 +454,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -492,7 +466,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -504,7 +478,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -516,7 +490,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -528,7 +502,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -540,7 +514,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -552,7 +526,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -564,7 +538,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -576,7 +550,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -588,7 +562,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -600,7 +574,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -612,7 +586,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -624,7 +598,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -636,7 +610,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -648,7 +622,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -660,7 +634,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -672,7 +646,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -684,7 +658,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -696,7 +670,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -708,7 +682,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -720,7 +694,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -732,7 +706,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -744,7 +718,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -756,7 +730,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -768,7 +742,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -780,7 +754,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -792,7 +766,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -804,7 +778,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -816,7 +790,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -828,7 +802,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -840,7 +814,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -852,7 +826,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -864,7 +838,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -876,7 +850,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -888,7 +862,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -900,7 +874,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -912,7 +886,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -924,7 +898,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -936,7 +910,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -948,7 +922,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -960,7 +934,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -972,7 +946,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -984,7 +958,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -996,7 +970,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1008,7 +982,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1020,7 +994,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1032,7 +1006,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1044,7 +1018,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1056,7 +1030,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1068,7 +1042,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1080,7 +1054,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1092,7 +1066,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1104,7 +1078,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1116,7 +1090,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1128,7 +1102,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1140,7 +1114,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1148,15 +1122,16 @@ class UserManagerTest extends PHPUnit_Framework_TestCase * @covers UserManager::get_user_id_of_course_admin_or_session_admin * @todo Implement testGet_user_id_of_course_admin_or_session_admin(). */ -/* - public function testGet_user_id_of_course_admin_or_session_admin() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } -*/ + /* + public function testGet_user_id_of_course_admin_or_session_admin() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + */ + /** * @covers UserManager::is_user_certified * @todo Implement testIs_user_certified(). @@ -1165,7 +1140,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1177,7 +1152,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1189,7 +1164,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1201,7 +1176,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1213,7 +1188,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1225,7 +1200,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1237,7 +1212,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1249,7 +1224,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1261,7 +1236,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1273,7 +1248,7 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } @@ -1285,7 +1260,8 @@ class UserManagerTest extends PHPUnit_Framework_TestCase { // Remove the following lines when you implement this test. $this->markTestIncomplete( - 'This test has not been implemented yet.' + 'This test has not been implemented yet.' ); } + }