sabre-io / cache

:handbag: Simple cache abstraction layer implementing PSR-16
BSD 3-Clause "New" or "Revised" License
54 stars 10 forks source link

Check memcached get resultCode more closely #53

Closed phil-davis closed 1 year ago

phil-davis commented 1 year ago

Issue #48

codecov[bot] commented 1 year ago

Codecov Report

Merging #53 (9643224) into master (98e8402) will increase coverage by 0.03%. The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master      #53      +/-   ##
============================================
+ Coverage     98.72%   98.75%   +0.03%     
- Complexity       88       89       +1     
============================================
  Files             4        4              
  Lines           157      161       +4     
============================================
+ Hits            155      159       +4     
  Misses            2        2              
Impacted Files Coverage Δ
lib/Memcached.php 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

phil-davis commented 1 year ago

Test added. I added the test to only MemcachedTest because that implementation does prohibit white-space in the key.

lib/Memory.php also implements a "memcache" but it does not prohibit white-space in the key. So the test case will not cause the "expected" exception on that implementation. IMO this does not matter - Memory cache is not meant for real production, and anyway, if someone does try to store keys containing white-space, then they will happily be be set and get without breaking.