[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/tests/ -> filelib_test.php (summary)

Unit tests for /lib/filelib.php.

Copyright: 2009 Jerome Mouneyrac
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 1257 lines (50 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

core_filelib_testcase:: (22 methods):
  test_format_postdata_for_curlcall()
  test_download_file_content()
  test_curl_basics()
  test_curl_redirects()
  test_curl_relative_redirects()
  test_curl_proxybypass()
  test_curl_post()
  test_curl_file()
  test_curl_protocols()
  test_prepare_draft_area()
  test_delete_original_file_from_draft()
  test_curl_strip_double_headers()
  test_get_mimetype_description()
  test_get_mimetypes_array()
  test_get_mimetype_for_sending()
  test_curl_useragent()
  test_file_rewrite_pluginfile_urls()
  create_draft_file()
  test_file_merge_files_from_draft_area_into_filearea()
  test_file_merge_files_from_draft_area_into_filearea_max_area_bytes()
  test_file_merge_files_from_draft_area_into_filearea_max_file_bytes()
  test_file_merge_files_from_draft_area_into_filearea_max_files()

testable_curl:: (5 methods):
  get_options()
  set_options()
  set_option()
  unset_option()
  call_apply_opt()


Class: core_filelib_testcase  - X-Ref

test_format_postdata_for_curlcall()   X-Ref
No description

test_download_file_content()   X-Ref
No description

test_curl_basics()   X-Ref
Test curl basics.


test_curl_redirects()   X-Ref
No description

test_curl_relative_redirects()   X-Ref
No description

test_curl_proxybypass()   X-Ref
No description

test_curl_post()   X-Ref
No description

test_curl_file()   X-Ref
No description

test_curl_protocols()   X-Ref
No description

test_prepare_draft_area()   X-Ref
Testing prepare draft area


test_delete_original_file_from_draft()   X-Ref
Testing deleting original files.


test_curl_strip_double_headers()   X-Ref
Tests the strip_double_headers function in the curl class.


test_get_mimetype_description()   X-Ref
Tests the get_mimetype_description function.


test_get_mimetypes_array()   X-Ref
Tests the get_mimetypes_array function.


test_get_mimetype_for_sending()   X-Ref
Tests for get_mimetype_for_sending function.


test_curl_useragent()   X-Ref
Test curl agent settings.


test_file_rewrite_pluginfile_urls()   X-Ref
Test file_rewrite_pluginfile_urls.


create_draft_file($filedata = array()   X-Ref
Helpter function to create draft files

param: array  $filedata data for the file record (to not use defaults)
return: stored_file the stored file instance

test_file_merge_files_from_draft_area_into_filearea()   X-Ref
Test file_merge_files_from_draft_area_into_filearea


test_file_merge_files_from_draft_area_into_filearea_max_area_bytes()   X-Ref
Test max area bytes for file_merge_files_from_draft_area_into_filearea


test_file_merge_files_from_draft_area_into_filearea_max_file_bytes()   X-Ref
Test max file bytes for file_merge_files_from_draft_area_into_filearea


test_file_merge_files_from_draft_area_into_filearea_max_files()   X-Ref
Test max file number for file_merge_files_from_draft_area_into_filearea


Class: testable_curl  - X-Ref

Test-specific class to allow easier testing of curl functions.

get_options()   X-Ref
Accessor for private options array using reflection.

return: array

set_options($options)   X-Ref
Setter for private options array using reflection.

param: array $options

set_option($option, $value)   X-Ref
Setter for individual option.

param: string $option
param: string $value

unset_option($option)   X-Ref
Unsets an option on the curl object

param: string $option

call_apply_opt($options = null)   X-Ref
Wrapper to access the private curl::apply_opt() method using reflection.

param: array $options
return: resource The curl handle



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1