Convert potential spaces in Memcache(d) key names

- Address https://github.com/friendica/friendica/issues/11630#issuecomment-1166475036
- Add test for space in cache keys
This commit is contained in:
Hypolite Petovan 2022-06-26 05:56:13 -04:00
parent c9d829a679
commit 91f5a7cc6b
4 changed files with 32 additions and 1 deletions

View file

@ -237,4 +237,13 @@ abstract class CacheTest extends MockedTest
self::assertNotContains('value1', $list);
self::assertNotContains('value2', $list);
}
/**
* @small
*/
public function testSpaceInKey()
{
self::assertTrue($this->instance->set('key space', 'value'));
self::assertEquals('value', $this->instance->get('key space'));
}
}