public function testReadWithInvalidSignature()
{
$class = $this->mock;
$currentData = MockCookieSession::data();
$signature = 'some_invalid_signature';
$result = MockCookieSession::write('__signature', $signature);
$this->assertEqual($signature, $result);
$value = 'data_read_that_wont_match_signature';
$expected = '/Possible data tampering: HMAC signature does not match data./';
$hmac = $this->Hmac;
$this->assertException($expected, function () use($hmac, $value, $class) {
$hmac->read($value, compact('class'));
});
}