Source for file Test_Curl.php

Documentation is available at Test_Curl.php

  1. <?php
  2. /**
  3. * Skeleton Test class file for ` group
  4. *
  5. * @package PhpSecInfo
  6. * @author Ed Finkler <coj@funkatron.com>
  7. */
  8.  
  9. /**
  10. * require the main PhpSecInfo class
  11. */
  12. require_once('PhpSecInfo/Test/Test.php');
  13.  
  14.  
  15.  
  16. /**
  17. * This is a skeleton class for PhpSecInfo "Curl" tests
  18. * @package PhpSecInfo
  19. */
  20. class PhpSecInfo_Test_Curl extends PhpSecInfo_Test
  21. {
  22.  
  23. /**
  24. * This value is used to group test results together.
  25. *
  26. * For example, all tests related to the mysql lib should be grouped under "mysql."
  27. *
  28. * @var string
  29. */
  30. var $test_group = 'Curl';
  31.  
  32.  
  33.  
  34. /**
  35. * "Curl" tests should only be run if the curl extension is installed. We can check
  36. * for this by seeing if the function curl_init() is defined
  37. *
  38. * @return boolean
  39. */
  40. function isTestable() {
  41. /* if ( function_exists('curl_init') ) {
  42. return true;
  43. } else {
  44. return false;
  45. }
  46. */
  47. return extension_loaded('curl');
  48. }
  49.  
  50.  
  51. /**
  52. * Set the messages for Curl tests
  53. *
  54. */
  55. function _setMessages() {
  56. parent::_setMessages();
  57.  
  58. $this->setMessageForResult(PHPSECINFO_TEST_RESULT_NOTRUN, 'en', "CURL support is not enabled in your PHP install");
  59.  
  60. }
  61.  
  62. }

Documentation generated on Mon, 26 Feb 2007 10:50:08 -0500 by phpDocumentor 1.3.0RC3