Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function testCompareStrings(): void |
||
21 | { |
||
22 | // test that two equal strings compare successfully |
||
23 | $this->assertTrue(Security::compareStrings('random string', 'random string')); |
||
24 | |||
25 | // test that two different, equal-length strings fail to compare |
||
26 | $this->assertFalse(Security::compareStrings('random string', 'string random')); |
||
27 | |||
28 | // test that two different-length strings fail to compare |
||
29 | $this->assertFalse(Security::compareStrings('one string', 'one string ')); |
||
30 | } |
||
32 |