예제 #1
0
 public function testEncryptDecrypt()
 {
     $plainText = "plaintext";
     $encryptedText = Cipher::getInstance()->encrypt($plainText);
     // Assert that the encrypted text is not the same as the plain text
     $this->assertNotEquals($plainText, $encryptedText);
     // Assert that the encrypted text is equal to the plain text when decrypted
     $this->assertEquals($plainText, Cipher::getInstance()->decrypt($encryptedText));
 }