/** * test that store and restore only store/restore the provided data. * * @return void */ public function testStoreAndRestoreWithData() { Cache::enable(); Cache::config('configure', ['className' => 'File', 'path' => TMP . 'tests']); Configure::write('testing', 'value'); Configure::store('store_test', 'configure', ['store_test' => 'one']); Configure::delete('testing'); $this->assertNull(Configure::read('store_test'), 'Calling store with data shouldn\'t modify runtime.'); Configure::restore('store_test', 'configure'); $this->assertEquals('one', Configure::read('store_test')); $this->assertNull(Configure::read('testing'), 'Values that were not stored are not restored.'); Cache::delete('store_test', 'configure'); Cache::drop('configure'); }