Skip to content

Commit

Permalink
Test case for #1451
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Oct 27, 2013
1 parent 79570ec commit e1a7f3b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions ext/tests/issue-1451.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
--TEST--
Memory corruption due to a bug in Phalcon\Cache\Backend\Memory::increment/decrement() - https://github.com/phalcon/cphalcon/issues/1451
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
<?php
$front = new \Phalcon\Cache\Frontend\None();
$cache = new \Phalcon\Cache\Backend\Memory($front);
$cache->save('var', 1);
$cache->increment('var');
echo $cache->get('var'), PHP_EOL;
$cache->decrement('var');
echo $cache->get('var'), PHP_EOL;
?>
--EXPECT--
2
1

0 comments on commit e1a7f3b

Please sign in to comment.