Completed
Push — master ( a73e85...13dd2e )
by Julito
08:28
created

UpdateUserPauseTrainingTest::testUpdate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 8
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 13
rs 10
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
require_once __DIR__.'/V2TestCase.php';
5
require_once __DIR__.'/../../../../vendor/autoload.php';
6
7
/**
8
 * UPDATE_USER_PAUSE_TRAINING webservice unit tests
9
 */
10
class UpdateUserPauseTrainingTest extends V2TestCase
11
{
12
    public function action()
13
    {
14
        return Rest::UPDATE_USER_PAUSE_TRAINING;
15
    }
16
17
    /**
18
     * creates a minimal test user
19
     * asserts that it was created with the supplied data
20
     *
21
     * @throws Exception if it cannot delete the created test user
22
     */
23
    public function testUpdate()
24
    {
25
        $params = [
26
            'user_id' => 1,
27
            'pause_formation' => 0,
28
            'start_pause_date' => '2020-06-30 10:00',
29
            'end_pause_date' => '2020-06-30 11:00',
30
            'allow_notifications' => 0,
31
        ];
32
        $userId = $this->integer($params);
33
34
        // assert each field was filled with provided information
35
        $this->assertSame($userId, 1);
36
    }
37
}
38