@@ -19,6 +19,8 @@ public function testCheck(): void
19
19
{
20
20
$ this ->assertTrue ($ this ->aman ->check ('This is a test with b@jIng4n word ' ));
21
21
22
+ $ this ->assertFalse ($ this ->aman ->check ('This banjir word ' ));
23
+
22
24
$ this ->assertFalse ($ this ->aman ->check ('This is a clean test ' ));
23
25
}
24
26
@@ -27,6 +29,9 @@ public function testMasking(): void
27
29
$ maskedString = $ this ->aman ->masking ('This is a test with b@jIng4n word ' );
28
30
$ this ->assertSame ('This is a test with ******** word ' , $ maskedString );
29
31
32
+ $ maskedFalse = $ this ->aman ->masking ('This banjir word ' );
33
+ $ this ->assertSame ('This banjir word ' , $ maskedFalse );
34
+
30
35
$ maskedStringWithHash = $ this ->aman ->masking ('This is a test with b@jIng4n word ' , '# ' );
31
36
$ this ->assertSame ('This is a test with ######## word ' , $ maskedStringWithHash );
32
37
}
@@ -35,6 +40,9 @@ public function testFilter(): void
35
40
{
36
41
$ filteredString = $ this ->aman ->filter ('This is a test with b@jIng4n word ' );
37
42
$ this ->assertSame ('This is a test with word ' , $ filteredString );
43
+
44
+ $ filteredString = $ this ->aman ->filter ('This banjir word ' );
45
+ $ this ->assertSame ('This banjir word ' , $ filteredString );
38
46
}
39
47
40
48
public function testWords (): void
@@ -45,6 +53,9 @@ public function testWords(): void
45
53
$ filteredWords = $ this ->aman ->words ('This is a test with b@jIng4n and k3p4rat word ' );
46
54
$ this ->assertSame (['b@jIng4n ' , 'k3p4rat ' ], $ filteredWords );
47
55
56
+ $ cleanWords = $ this ->aman ->words ('This banjir word ' );
57
+ $ this ->assertSame ([], $ cleanWords );
58
+
48
59
$ cleanWords = $ this ->aman ->words ('This is a clean test ' );
49
60
$ this ->assertSame ([], $ cleanWords );
50
61
}
0 commit comments