public function testEncryptDecrypt() { $enc = new EncryptUtil(); $enc->key = EncryptUtil::genKey(); $expectedValue = $this->junkToEncrypt; $encrypted = $enc->encrypt($expectedValue); $this->assertNotEquals($expectedValue, $encrypted, 'Failed asserting data was encrypted.'); $decrypted = $enc->decrypt($encrypted); $this->assertEquals($expectedValue, $decrypted, 'Failed asserting that data was preserved in encryption/decryption.'); }