LDAPChangePasswordHandlerTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testReturnsLdapChangePasswordForm() 0 11 1
1
<?php
2
3
namespace SilverStripe\LDAP\Tests\Authenticators;
4
5
use SilverStripe\Control\HTTPRequest;
6
use SilverStripe\Control\Session;
7
use SilverStripe\Core\Injector\Injector;
8
use SilverStripe\Dev\SapphireTest;
9
use SilverStripe\LDAP\Authenticators\LDAPAuthenticator;
10
use SilverStripe\LDAP\Authenticators\LDAPChangePasswordHandler;
11
use SilverStripe\LDAP\Forms\LDAPChangePasswordForm;
12
13
class LDAPChangePasswordHandlerTest extends SapphireTest
14
{
15
    public function testReturnsLdapChangePasswordForm()
16
    {
17
        $this->logOut();
18
19
        $request = (new HTTPRequest('GET', '/'))
20
            ->setSession(new Session([]));
21
22
        $handler = LDAPChangePasswordHandler::create('foo', new LDAPAuthenticator())
23
            ->setRequest($request);
24
25
        $this->assertInstanceOf(LDAPChangePasswordForm::class, $handler->changePasswordForm());
26
    }
27
}
28