Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/main/webservices/api/tests/UpdateUserPauseTrainingTest...

37 lines
970 B

<?php
/* For licensing terms, see /license.txt */
require_once __DIR__.'/V2TestCase.php';
require_once __DIR__.'/../../../../vendor/autoload.php';
/**
* UPDATE_USER_PAUSE_TRAINING webservice unit tests
*/
class UpdateUserPauseTrainingTest extends V2TestCase
{
public function action()
{
return Rest::UPDATE_USER_PAUSE_TRAINING;
}
/**
* creates a minimal test user
* asserts that it was created with the supplied data
*
* @throws Exception if it cannot delete the created test user
*/
public function testUpdate()
{
$params = [
'user_id' => 1,
'pause_formation' => 0,
'start_pause_date' => '2020-06-30 10:00',
'end_pause_date' => '2020-06-30 11:00',
'disable_emails' => 1,
];
$userId = $this->integer($params);
// assert each field was filled with provided information
$this->assertSame($userId, 1);
}
}