Nelmio\SecurityBundle\Tests\EncrypterTest::testEncryption PHP Method

testEncryption() public method

public testEncryption ( )
    public function testEncryption()
    {
        $encrypter = new Encrypter('secret', 'rijndael-128');
        $value = 'bar';
        $encryptedValue = $encrypter->encrypt($value);
        $this->assertNotEquals($encryptedValue, $value);
        $decrypted = $encrypter->decrypt($encryptedValue);
        $this->assertEquals($decrypted, $value);
    }