Total Complexity | 10 |
Total Lines | 60 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class Testing extends Core { |
||
9 | public function testWriteEventFailedLogin($username){ |
||
10 | |||
11 | $this->eventFailedLogin($username); |
||
12 | |||
13 | $input = $username; |
||
14 | $dir = config('irfa.lockout.lockout_file_path'); |
||
15 | $path = $dir.md5($input); |
||
16 | |||
17 | if(File::exists($path)) |
||
18 | { |
||
19 | return true; |
||
20 | } |
||
21 | return false; |
||
22 | } |
||
23 | public function testWritable($username){ |
||
24 | $input = $username; |
||
25 | $dir = config('irfa.lockout.lockout_file_path'); |
||
26 | $path = $dir.md5($input); |
||
27 | |||
28 | if(is_writable($path)) |
||
29 | { |
||
30 | return true; |
||
31 | } |
||
32 | return false; |
||
33 | } |
||
34 | |||
35 | public function testManualLocking($username){ |
||
36 | $input = $username; |
||
37 | $dir = config('irfa.lockout.lockout_file_path'); |
||
38 | $path = $dir.md5($input); |
||
|
|||
39 | |||
40 | if($this->lock_account($username)) |
||
41 | { |
||
42 | return true; |
||
43 | } |
||
44 | return false; |
||
45 | } |
||
46 | |||
47 | public function testUnlocking($username){ |
||
48 | $input = $username; |
||
49 | $dir = config('irfa.lockout.lockout_file_path'); |
||
50 | $path = $dir.md5($input); |
||
51 | $unlock = $this->test_unlock_account($username); |
||
52 | if($unlock) |
||
53 | { |
||
54 | return true; |
||
55 | } |
||
56 | return false; |
||
57 | } |
||
58 | public function testLockLogin($username){ |
||
68 | } |
||
69 | } |
||
70 |