Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
6 | public function testEncryption() |
||
7 | { |
||
8 | require_once __DIR__ . '/../vendor/autoload.php'; |
||
9 | |||
10 | $passphrase = 'test-passphrase'; |
||
11 | |||
12 | $cryptoGuard = new \Coreproc\CryptoGuard\CryptoGuard($passphrase); |
||
13 | |||
14 | $stringToEncrypt = 'test string to encrypt'; |
||
15 | |||
16 | $encryptedText = $cryptoGuard->encrypt($stringToEncrypt); |
||
17 | |||
18 | $decryptedText = $cryptoGuard->decrypt($encryptedText); |
||
19 | |||
20 | $this->assertEquals($stringToEncrypt, $decryptedText); |
||
21 | } |
||
22 | |||
49 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.