public function testAutoSaveRemoveByPrefix() { AutoSave::add('red', 'value'); AutoSave::add('really', 'value'); AutoSave::add('reaper', 'value'); AutoSave::removeAllByPrefix('rea'); $this->assertEquals(Autosave::get('red'), 'value'); $this->assertNull(Autosave::get('really')); $this->assertNull(Autosave::get('reaper')); }
public static function saveFormData($patient_id, $queue_id, $data) { $key = static::getAutoSaveKey($patient_id, $queue_id); \AutoSave::add($key, $data); }