function testCacheOverrideFileWasModified() { register_testing_ini( 'testing2.ini', 'test = 1' ); register_testing_ini( 'testing2.override.ini', 'test = 2' ); $ini = new ini(VAR_DIR . 'testing2.ini', true); //ini should be cached here... // caching happens very quickly we have to tweak the original file modification time // in order to test touch($ini->get_original_file(), time()-100); touch($ini->get_override_file(), time()+100); $ini_mock = new IniMockVersionOverride($this); $ini_mock->expectOnce('_parse'); $ini_mock->expectOnce('_save_cache'); $ini_mock->ini(VAR_DIR . 'testing2.ini', true); $ini_mock->tally(); $ini->reset_cache(); }