Skip to content

Commit

Permalink
Add testcase for get-method overload (php-memcached-dev#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
SjonHortensius authored and sodabrew committed Jan 24, 2017
1 parent 2af9b61 commit d5b21ea
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ Tests
<file role='test' name='default_behavior.phpt'/>
<file role='test' name='reset_keyprefix.phpt'/>
<file role='test' name='session_lock-php71.phpt'/>
<file role='test' name='overload_get.phpt'/>
</dir>
</dir>
</contents>
Expand Down
16 changes: 16 additions & 0 deletions tests/overload_get.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
--TEST--
Test overloading get-method
--SKIPIF--
<?php if (!extension_loaded("memcached")) print "skip"; ?>
--FILE--
<?php
class test_overload_get extends Memcached
{
public function get($key, $cache_cb = null, &$cas_token = null)
{
return parent::get($key, $cache_cb, $cas_token);
}
}
echo "GOT HERE";
--EXPECTF--
GOT HERE

0 comments on commit d5b21ea

Please sign in to comment.