Fuente: https://github.com/chamilo/chamilo-lms/releases/download/v1.11.40/chamilo-1.11.40.zip sha256: 1cf4bf2cc7bae1ef1a1eff643235db1d552f78ddf4b6dd1e2d2dac9868679439 Snapshot independiente (rama huerfana); diffable vs 1.11.38. vendor incluido.
38 lines
970 B
PHP
38 lines
970 B
PHP
<?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);
|
|
}
|
|
}
|