Passed
Push — master ( 7d637a...6fbdef )
by Sathish
03:24
created

UserRegistrationPageTest::testCanCreate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace UserManagement\Tests;
4
5
use SilverStripe\Dev\FunctionalTest;
6
use UserManagement\Page\UserRegistrationPage;
7
8
/**
9
 * Class UserRegistrationPageTest
10
 *
11
 * @package user-management
12
 */
13
class UserRegistrationPageTest extends FunctionalTest
14
{
15
    
16
    /**
17
     * User registration page link test
18
     */
19
    public function testfindlink()
20
    {
21
        $page = $this->get("user-registration/");  // attempt to access the signup Page
22
        $this->assertEquals(200, $page->getStatusCode(), "a page should load");
23
        $this->assertEquals(UserRegistrationPage::find_link(false), "/user-registration/", "user-registration page exists");
24
    }
25
26
    public function testCanCreate()
27
    {
28
        $canCreate = UserRegistrationPage::create()->canCreate();
29
        $this->assertNotTrue($canCreate, "Can create");
30
    }
31
}
32