Class Horde_Test

Description

The Horde_Test:: class provides functions used in the test scripts used in the various applications (test.php).

$Horde: horde/lib/Test.php,v 1.31.4.26 2009/01/06 15:24:51 jan Exp $

Copyright 1999-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Located in /lib/Test.php (line 42)


	
			
Variable Summary
 array $_appoutput
 array $_phpver
 array $_supported
Method Summary
 Horde_Test Horde_Test ()
 array applicationList ()
 void configFilesMissing (string $app, string $appBase, array $files, [array $additional = array()])
 object stdClass getPhpVersionInformation ()
 void isRecentPEAR (boolean 0)
 string PEARModuleCheck (array $pear_list)
 string phpModuleCheck (array $modlist)
 string phpSettingCheck ( $settings_list, array $modlist)
 string requiredAppCheck (array $app_list)
 string requiredFileCheck (array $file_list)
 void splitPHPVersion (string $version, array 1)
Variables
array $applications = array() (line 50)

Array that holds the list of Horde applications.

(Loaded from config/registry.php)

array $_appoutput = array() (line 57)

Cached results of getApplications().

array $_phpver (line 64)

The PHP version of the system.

array $_supported = array(
'4.3', '4.4', '5.0', '5.1', '5.2'
)
(line 71)

Supported versions of PHP.

Methods
Constructor Horde_Test (line 78)

Constructor.

Horde_Test Horde_Test ()
applicationList (line 624)

Get the application list.

  • return: List of stdClass objects. KEY: application name ELEMENT 'version': Version of application ELEMENT 'test': The location of the test script (if any)
array applicationList ()
configFilesMissing (line 418)

Displays an error screen with a list of all configuration files that are missing, together with a description what they do and how they are created. If a file can be automatically created from the defaults, then we do that instead and don't display an error.

void configFilesMissing (string $app, string $appBase, array $files, [array $additional = array()])
  • string $app: The application name
  • string $appBase: The path to the application
  • array $files: An array with the "standard" configuration files that should be checked. Currently supported:
    • conf.php
    • prefs.php
    • mime_drivers.php
  • array $additional: An associative array containing more files (as keys) and error message (as values) if they don't exist.
getPhpVersionInformation (line 578)

Obtain information on the PHP version.

  • return: TODO
object stdClass getPhpVersionInformation ()
isRecentPEAR (line 564)

Is this a 'recent' version of PEAR?

void isRecentPEAR (boolean 0)
  • boolean 0: True if a recent version of PEAR.
PEARModuleCheck (line 285)

Check the list of PEAR modules.

  • return: The HTML output.
string PEARModuleCheck (array $pear_list)
  • array $pear_list: The PEAR module list.
     KEY:   PEAR class name
     VALUE: An array with the following entries:
            'depends'   --  This module depends on another module
            'error'     --  Error Message
            'function'  --  Reference to function to run if module is found
            'path'      --  The path to the PEAR module
            'required'  --  Is this PEAR module required? (boolean)
phpModuleCheck (line 168)

Check the list of PHP modules.

  • return: The HTML output.
string phpModuleCheck (array $modlist)
  • array $modlist: The module list.
     KEY:   module name
     VALUE: Either the description or an array with the following entries:
            'descrip'  --  Module Description
            'error'    --  Error Message
            'fatal'    --  Is missing module fatal?
            'phpver'   --  The PHP version above which to do the test
phpSettingCheck (line 242)

Checks the list of PHP settings.

  • return: The HTML output.
string phpSettingCheck ( $settings_list, array $modlist)
  • array $modlist: The settings list.
    1.  KEY:   setting name
    2.  VALUEAn array with the following entries:
    3.         'error'    --  Error Message
    4.         'setting'  --  Either a boolean (whether setting should be on or
    5.                        offor 'value'which will simply output the
    6.                        value of the setting.
  • $settings_list
requiredAppCheck (line 527)

Check the list of required Horde applications.

  • return: The HTML output.
string requiredAppCheck (array $app_list)
  • array $app_list: The application list.
     KEY:   application name
     VALUE: An array with the following entries:
            'error'    --  Error Message
            'version'  --  The minimum version required
requiredFileCheck (line 375)

Check the list of required files

  • return: The HTML output.
string requiredFileCheck (array $file_list)
  • array $file_list: The file list.
     KEY:   file path
     VALUE: The error message to use (null to use default message)
splitPHPVersion (line 104)

Parse PHP version.

void splitPHPVersion (string $version, array 1)
  • string $version: A PHP-style version string (X.X.X).
  • array 1: The parsed string. Keys: 'major', 'minor', 'subminor', 'class'

Documentation generated on Sun, 30 Jan 2011 05:26:54 +0000 by phpDocumentor 1.4.3