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

UpdateUserPauseTrainingTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 26
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testUpdate() 0 13 1
A action() 0 3 1
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