File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 10
10
11
11
class EncrypterTest extends TestCase
12
12
{
13
- public function testEncryption ()
13
+ public function testEncryption (): void
14
14
{
15
15
$ e = new Encrypter (str_repeat ('a ' , 16 ));
16
16
$ encrypted = $ e ->encrypt ('foo ' );
17
17
$ this ->assertNotSame ('foo ' , $ encrypted );
18
18
$ this ->assertSame ('foo ' , $ e ->decrypt ($ encrypted ));
19
+
20
+ $ encrypted = $ e ->encrypt ('' );
21
+ $ this ->assertSame ('' , $ e ->decrypt ($ encrypted ));
22
+
23
+ $ longString = str_repeat ('a ' , 1000 );
24
+ $ encrypted = $ e ->encrypt ($ longString );
25
+ $ this ->assertSame ($ longString , $ e ->decrypt ($ encrypted ));
26
+
27
+ $ data = ['foo ' => 'bar ' , 'baz ' => 'qux ' ];
28
+ $ encryptedArray = $ e ->encrypt ($ data );
29
+ $ this ->assertNotSame ($ data , $ encryptedArray );
30
+ $ this ->assertSame ($ data , $ e ->decrypt ($ encryptedArray ));
19
31
}
20
32
21
33
public function testRawStringEncryption ()
You can’t perform that action at this time.
0 commit comments