PATH:
opt
/
alt
/
tests
/
alt-php81-pecl-uploadprogress_2.0.2-1.el8
/
tests
--TEST-- uploadprogress_get_contents - When contents file cannot be read --SKIPIF-- <?php if (!extension_loaded('uploadprogress')) exit('skip extension not loaded'); --INI-- uploadprogress.get_contents = On --FILE-- <?php ini_set('uploadprogress.file.contents_template', dirname(__FILE__) . '/mocks/get_info/upload_contents_%s'); $testFile = dirname(__FILE__) . '/mocks/get_contents/upload_contents_variation006-field'; $permissions = fileperms($testFile); // Set the permissions on the file to test to writable only. This should ensure // that this script cannot read from the file, for proper testing. chmod($testFile, 0200); $contents = uploadprogress_get_contents('variation006', 'field'); var_dump($contents); // Set the file back to its original permissions. This makes sure that we // don't get any weird VCS issues with files showing up as changed when they // haven't really changed. chmod($testFile, $permissions & 0777); --EXPECTF-- bool(false)
[-] uploadprogress_get_contents_variation003.phpt
[edit]
[-] uploadprogress_get_contents_error003.phpt
[edit]
[-] uploadprogress_get_info_error001.phpt
[edit]
[-] uploadprogress_get_info_variation002.phpt
[edit]
[-] uploadprogress_get_contents_variation005.phpt
[edit]
[-] uploadprogress_get_contents_error002.phpt
[edit]
[-] uploadprogress_get_contents_variation004.phpt
[edit]
[-] uploadprogress_get_info_error004.phpt
[edit]
[-] uploadprogress_get_info_variation004.phpt
[edit]
[-] uploadprogress_get_info_error002.phpt
[edit]
[-] uploadprogress_get_contents_variation006.phpt
[edit]
[-] uploadprogress_get_info_error003.phpt
[edit]
[-] uploadprogress_get_contents_variation002.phpt
[edit]
[-] uploadprogress_get_contents_variation001.phpt
[edit]
[+]
..
[-] uploadprogress_get_contents_basic.phpt
[edit]
[-] uploadprogress_get_info_basic.phpt
[edit]
[+]
mocks
[-] uploadprogress_get_contents_error001.phpt
[edit]
[-] uploadprogress_get_contents_error004.phpt
[edit]
[-] bug58318.phpt
[edit]
[-] uploadprogress_get_info_variation001.phpt
[edit]