public function testWrite()
{
$encrypt = new Encrypt(array('secret' => $this->secret));
$key = 'fookey';
$value = 'barvalue';
$result = $encrypt->write($value, array('class' => $this->mock, 'key' => $key));
$cookie = MockCookieSession::data();
$this->assertNotEmpty($result);
$this->assertNotEmpty($cookie['__encrypted']);
$this->assertInternalType('string', $cookie['__encrypted']);
$this->assertNotEqual($cookie['__encrypted'], $value);
}