Public Member Functions | |
| PhpSecInfo_Test () | |
| isTestable () | |
| _execTest () | |
| _setMessages () | |
| test () | |
| getResult () | |
| getMessage () | |
| setMessageForResult ($result_code, $language_code, $message) | |
| _setResult ($result_code) | |
| _setMessage ($result_code, $language_code) | |
| getTestName () | |
| setTestName ($test_name) | |
| getTestGroup () | |
| returnBytes ($val) | |
| getBooleanIniValue ($ini_key) | |
Data Fields | |
| $test_group = 'misc' | |
| $test_name = 'misc_test' | |
| $_result = PHPSECINFO_TEST_RESULT_NOTRUN | |
| $_message | |
| $_language = PHPSECINFO_LANG_DEFAULT | |
| $_messages = array() | |
Definition at line 35 of file Test.php.
| _execTest | ( | ) |
Reimplemented in PhpSecInfo_Test_Cgi_Force_Redirect, PhpSecInfo_Test_Core_Allow_Url_Fopen, PhpSecInfo_Test_Core_Display_Errors, PhpSecInfo_Test_Core_Expose_Php, PhpSecInfo_Test_Core_File_Uploads, PhpSecInfo_Test_Core_Gid, PhpSecInfo_Test_Core_Magic_Quotes_GPC, PhpSecInfo_Test_Core_Memory_Limit, PhpSecInfo_Test_Core_Open_Basedir, PhpSecInfo_Test_Core_Post_Max_Size, PhpSecInfo_Test_Core_Register_Globals, PhpSecInfo_Test_Core_Uid, PhpSecInfo_Test_Core_Upload_Max_Filesize, PhpSecInfo_Test_Core_Upload_Tmp_Dir, PhpSecInfo_Test_Curl_File_Support, and PhpSecInfo_Test_Session_Use_Trans_Sid.
| _setMessage | ( | $ | result_code, | |
| $ | language_code | |||
| ) |
| _setMessages | ( | ) |
This function loads up result messages into the $this->_messages array.
Using this method rather than setting $this->_messages directly allows result messages to be inherited. This is broken out into a separate function rather than the constructor for ease of extending purposes (php4 is whack, man).
Reimplemented in PhpSecInfo_Test_Cgi_Force_Redirect, PhpSecInfo_Test_Core_Allow_Url_Fopen, PhpSecInfo_Test_Core_Display_Errors, PhpSecInfo_Test_Core_Expose_Php, PhpSecInfo_Test_Core_File_Uploads, PhpSecInfo_Test_Core_Gid, PhpSecInfo_Test_Core_Magic_Quotes_GPC, PhpSecInfo_Test_Core_Memory_Limit, PhpSecInfo_Test_Core_Open_Basedir, PhpSecInfo_Test_Core_Post_Max_Size, PhpSecInfo_Test_Core_Register_Globals, PhpSecInfo_Test_Core_Uid, PhpSecInfo_Test_Core_Upload_Max_Filesize, PhpSecInfo_Test_Core_Upload_Tmp_Dir, PhpSecInfo_Test_Curl_File_Support, PhpSecInfo_Test_Session_Use_Trans_Sid, PhpSecInfo_Test_Cgi, and PhpSecInfo_Test_Curl.
| _setResult | ( | $ | result_code | ) |
| getBooleanIniValue | ( | $ | ini_key | ) |
This method converts the several possible return values from allegedly "boolean" ini settings to proper booleans
Properly converted input values are: 'off', 'on', 'false', 'true', '0', '1' (the last two might not be neccessary, but I'd rather be safe)
If the ini_value doesn't match any of those, the value is returned as-is.
| string | $ini_key the ini_key you need the value of |
| getMessage | ( | ) |
| getTestGroup | ( | ) |
| getTestName | ( | ) |
| isTestable | ( | ) |
Determines whether or not it's appropriate to run this test (for example, if this test is for a particular library, it shouldn't be run if the lib isn't loaded).
This is a terrible name, but I couldn't think of a better one atm.
Reimplemented in PhpSecInfo_Test_Cgi, PhpSecInfo_Test_Core, PhpSecInfo_Test_Curl, and PhpSecInfo_Test_Session.
| PhpSecInfo_Test | ( | ) |
Constructor for Test skeleton class
| returnBytes | ( | $ | val | ) |
This function takes the shorthand notation used in memory limit settings for PHP and returns the byte value. Totally stolen from http://us3.php.net/manual/en/function.ini-get.php
echo 'post_max_size in bytes = ' . $this->return_bytes(ini_get('post_max_size'));
| setMessageForResult | ( | $ | result_code, | |
| $ | language_code, | |||
| $ | message | |||
| ) |
| setTestName | ( | $ | test_name | ) |
| test | ( | ) |
| $_language = PHPSECINFO_LANG_DEFAULT |
| $_messages = array() |
Reimplemented in PhpSecInfo_Test_Core_Open_Basedir, and PhpSecInfo_Test_Core_Upload_Tmp_Dir.
| $_result = PHPSECINFO_TEST_RESULT_NOTRUN |
| $test_group = 'misc' |
Reimplemented in PhpSecInfo_Test_Cgi, PhpSecInfo_Test_Core, PhpSecInfo_Test_Curl, and PhpSecInfo_Test_Session.
| $test_name = 'misc_test' |
Reimplemented in PhpSecInfo_Test_Cgi_Force_Redirect, PhpSecInfo_Test_Core_Allow_Url_Fopen, PhpSecInfo_Test_Core_Display_Errors, PhpSecInfo_Test_Core_Expose_Php, PhpSecInfo_Test_Core_File_Uploads, PhpSecInfo_Test_Core_Gid, PhpSecInfo_Test_Core_Magic_Quotes_GPC, PhpSecInfo_Test_Core_Memory_Limit, PhpSecInfo_Test_Core_Open_Basedir, PhpSecInfo_Test_Core_Post_Max_Size, PhpSecInfo_Test_Core_Register_Globals, PhpSecInfo_Test_Core_Uid, PhpSecInfo_Test_Core_Upload_Max_Filesize, PhpSecInfo_Test_Core_Upload_Tmp_Dir, PhpSecInfo_Test_Curl_File_Support, and PhpSecInfo_Test_Session_Use_Trans_Sid.
1.6.3