bool TestExtStream::test_stream_resolve_include_path() { String old_include_path = f_get_include_path(); f_set_include_path(".:test/"); String filename = f_getcwd(); filename += "/test/test_ext_file.txt"; VS(filename, f_stream_resolve_include_path("test_ext_file.txt")); VS(null, f_stream_resolve_include_path("some-nonexistant-file.ext")); f_set_include_path(old_include_path); return Count(true); }
static String HHVM_FUNCTION(set_include_path, const Variant& new_include_path) { String s = f_get_include_path(); IniSetting::SetUser("include_path", new_include_path.toString()); return s; }
bool TestExtOptions::test_get_include_path() { f_get_include_path(); return Count(true); }
String f_set_include_path(const String& new_include_path) { String s = f_get_include_path(); IniSetting::SetUser("include_path", new_include_path); return s; }