15
15
16
16
class UserCheckerTest extends \PHPUnit_Framework_TestCase
17
17
{
18
- public function testCheckPreAuthNotAdvancedUserInterface ()
18
+ public function testCheckPostAuthNotAdvancedUserInterface ()
19
19
{
20
20
$ checker = new UserChecker ();
21
21
22
- $ this ->assertNull ($ checker ->checkPreAuth ($ this ->getMock ('Symfony\Component\Security\Core\User\UserInterface ' )));
22
+ $ this ->assertNull ($ checker ->checkPostAuth ($ this ->getMock ('Symfony\Component\Security\Core\User\UserInterface ' )));
23
23
}
24
24
25
- public function testCheckPreAuthPass ()
25
+ public function testCheckPostAuthPass ()
26
26
{
27
27
$ checker = new UserChecker ();
28
28
29
29
$ account = $ this ->getMock ('Symfony\Component\Security\Core\User\AdvancedUserInterface ' );
30
30
$ account ->expects ($ this ->once ())->method ('isCredentialsNonExpired ' )->will ($ this ->returnValue (true ));
31
31
32
- $ this ->assertNull ($ checker ->checkPreAuth ($ account ));
32
+ $ this ->assertNull ($ checker ->checkPostAuth ($ account ));
33
33
}
34
34
35
35
/**
36
36
* @expectedException \Symfony\Component\Security\Core\Exception\CredentialsExpiredException
37
37
*/
38
- public function testCheckPreAuthCredentialsExpired ()
38
+ public function testCheckPostAuthCredentialsExpired ()
39
39
{
40
40
$ checker = new UserChecker ();
41
41
42
42
$ account = $ this ->getMock ('Symfony\Component\Security\Core\User\AdvancedUserInterface ' );
43
43
$ account ->expects ($ this ->once ())->method ('isCredentialsNonExpired ' )->will ($ this ->returnValue (false ));
44
44
45
- $ checker ->checkPreAuth ($ account );
45
+ $ checker ->checkPostAuth ($ account );
46
46
}
47
47
48
- public function testCheckPostAuthNotAdvancedUserInterface ()
48
+ public function testCheckPreAuthNotAdvancedUserInterface ()
49
49
{
50
50
$ checker = new UserChecker ();
51
51
52
- $ this ->assertNull ($ checker ->checkPostAuth ($ this ->getMock ('Symfony\Component\Security\Core\User\UserInterface ' )));
52
+ $ this ->assertNull ($ checker ->checkPreAuth ($ this ->getMock ('Symfony\Component\Security\Core\User\UserInterface ' )));
53
53
}
54
54
55
- public function testCheckPostAuthPass ()
55
+ public function testCheckPreAuthPass ()
56
56
{
57
57
$ checker = new UserChecker ();
58
58
@@ -61,40 +61,40 @@ public function testCheckPostAuthPass()
61
61
$ account ->expects ($ this ->once ())->method ('isEnabled ' )->will ($ this ->returnValue (true ));
62
62
$ account ->expects ($ this ->once ())->method ('isAccountNonExpired ' )->will ($ this ->returnValue (true ));
63
63
64
- $ this ->assertNull ($ checker ->checkPostAuth ($ account ));
64
+ $ this ->assertNull ($ checker ->checkPreAuth ($ account ));
65
65
}
66
66
67
67
/**
68
68
* @expectedException \Symfony\Component\Security\Core\Exception\LockedException
69
69
*/
70
- public function testCheckPostAuthAccountLocked ()
70
+ public function testCheckPreAuthAccountLocked ()
71
71
{
72
72
$ checker = new UserChecker ();
73
73
74
74
$ account = $ this ->getMock ('Symfony\Component\Security\Core\User\AdvancedUserInterface ' );
75
75
$ account ->expects ($ this ->once ())->method ('isAccountNonLocked ' )->will ($ this ->returnValue (false ));
76
76
77
- $ checker ->checkPostAuth ($ account );
77
+ $ checker ->checkPreAuth ($ account );
78
78
}
79
79
80
80
/**
81
81
* @expectedException \Symfony\Component\Security\Core\Exception\DisabledException
82
82
*/
83
- public function testCheckPostAuthDisabled ()
83
+ public function testCheckPreAuthDisabled ()
84
84
{
85
85
$ checker = new UserChecker ();
86
86
87
87
$ account = $ this ->getMock ('Symfony\Component\Security\Core\User\AdvancedUserInterface ' );
88
88
$ account ->expects ($ this ->once ())->method ('isAccountNonLocked ' )->will ($ this ->returnValue (true ));
89
89
$ account ->expects ($ this ->once ())->method ('isEnabled ' )->will ($ this ->returnValue (false ));
90
90
91
- $ checker ->checkPostAuth ($ account );
91
+ $ checker ->checkPreAuth ($ account );
92
92
}
93
93
94
94
/**
95
95
* @expectedException \Symfony\Component\Security\Core\Exception\AccountExpiredException
96
96
*/
97
- public function testCheckPostAuthAccountExpired ()
97
+ public function testCheckPreAuthAccountExpired ()
98
98
{
99
99
$ checker = new UserChecker ();
100
100
@@ -103,6 +103,6 @@ public function testCheckPostAuthAccountExpired()
103
103
$ account ->expects ($ this ->once ())->method ('isEnabled ' )->will ($ this ->returnValue (true ));
104
104
$ account ->expects ($ this ->once ())->method ('isAccountNonExpired ' )->will ($ this ->returnValue (false ));
105
105
106
- $ checker ->checkPostAuth ($ account );
106
+ $ checker ->checkPreAuth ($ account );
107
107
}
108
108
}
0 commit comments