bool TestExtOutput::test_ob_get_clean() { f_ob_start(); f_ob_start(); g_context->out() << "test"; VS(f_ob_get_clean(), "test"); VS(f_ob_get_clean(), ""); VS(f_ob_get_clean(), ""); return Count(true); }
bool TestExtOutput::test_ob_flush() { f_ob_start(); f_ob_start("strtolower"); g_context->write("TEst"); f_ob_flush(); VS(f_ob_get_clean(), ""); VS(f_ob_get_clean(), "test"); return Count(true); }
bool TestExtZlib::test_readgzfile() { f_ob_start(); f_readgzfile("test/test_ext_zlib.gz"); VS(f_ob_get_clean(), "Testing Ext Zlib\n"); f_ob_end_clean(); return Count(true); }
bool TestExtFile::test_readfile() { f_ob_start(); VS(f_readfile("test/test_ext_file.txt"), 17); VS(f_ob_get_clean(), "Testing Ext File\n"); f_ob_end_clean(); return Count(true); }
bool TestExtFile::VerifyFile(CVarRef f, CStrRef contents) { f_ob_start(); f_fpassthru(f); VS(f_ob_get_clean(), contents); f_ob_end_clean(); return true; }
bool TestExtOutput::test_ob_end_clean() { f_ob_start(); f_ob_start("strtolower"); g_context->out() << "TEst"; f_ob_end_clean(); VS(f_ob_get_clean(), ""); return Count(true); }
bool TestExtZlib::test_gzpassthru() { Variant f = f_gzopen("test/test_ext_zlib.gz", "r"); f_ob_start(); f_gzpassthru(f); VS(f_ob_get_clean(), "Testing Ext Zlib\n"); f_ob_end_clean(); return Count(true); }
bool TestExtFile::test_fpassthru() { Variant f = f_fopen("test/test_ext_file.txt", "r"); f_ob_start(); VS(f_fpassthru(f), 17); VS(f_ob_get_clean(), "Testing Ext File\n"); f_ob_end_clean(); return Count(true); }
bool TestExtZlib::test_gzencode() { Variant zipped = f_gzencode("testing gzencode"); Variant f = f_fopen("test/test_ext_zlib.tmp", "w"); f_fwrite(f, zipped); f_fclose(f); f_ob_start(); f_readgzfile("test/test_ext_zlib.tmp"); VS(f_ob_get_clean(), "testing gzencode"); f_ob_end_clean(); return Count(true); }