Passed
Push — master ( 451774...ac42ad )
by Sathish
01:39
created

testgetCustomerGroupID()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace UserManagement\Tests;
4
5
use SilverStripe\Dev\FunctionalTest;
6
use SilverStripe\SiteConfig\SiteConfig;
7
8
/**
9
 * Class UserManagementConfigExtensionTest
10
 *
11
 * @package user-management
12
 */
13
class UserManagementConfigExtensionTest extends FunctionalTest
14
{
15
    
16
    private $siteconfig;
17
18
    protected function setUp()
19
    {
20
        parent::setUp();
21
22
        $this->siteconfig = SiteConfig::create();
23
    }
24
25
    /**
26
     * Login url test
27
     */
28
    public function testgetLoginUrlID()
29
    {
30
       
31
        $loginurlid = $this->siteconfig->getLoginUrlID();
32
        $this->assertNotNull($loginurlid, "login url exists");
33
    }
34
35
36
    /**
37
     * Login call back url test
38
     */
39
    public function testgetLoginCallBackUrlID()
40
    {
41
       
42
        $logincallbackurlid = $this->siteconfig->getLoginCallBackUrlID();
43
        $this->assertNotNull($logincallbackurlid, "login call back url exists");
44
    }
45
46
    /**
47
     * Lost password url test
48
     */
49
    public function testgetLostPasswordUrlID()
50
    {
51
       
52
        $lostpasswordurlid = $this->siteconfig->getLostPasswordUrlID();
53
        $this->assertNotNull($lostpasswordurlid, "lost password url exists");
54
    }
55
56
    /**
57
     * Customer group id test
58
     */
59
    public function testgetCustomerGroupID()
60
    {
61
       
62
        $customergroupid = $this->siteconfig->getCustomerGroupID();
63
        $this->assertNotNull($customergroupid, "lost password url exists");
64
    }
65
66
    /**
67
     * Export fields test
68
     */
69
    public function testgetExportFieldNames()
70
    {
71
       
72
        $exportfields = $this->siteconfig->getExportFieldNames();
73
        $this->assertNotEmpty($exportfields, "export fields should be returned");
74
    }
75
}
76