PEAR
[ class tree: PEAR ] [ index: PEAR ] [ all elements ]

Class: PEAR_RunTest

Source Location: /PEAR-1.10.12/PEAR/RunTest.php

Class Overview


Simplified version of PHP's test suite


Author(s):

Version:

  • Release: 1.10.12

Copyright:

  • 1997-2009 The Authors

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 44]
Simplified version of PHP's test suite

Try it with:

$ php -r 'include "../PEAR/RunTest.php"; $t=new PEAR_RunTest; $o=$t->run("./pear_system.phpt");print_r($o);'



[ Top ]


Class Variables

$ini_overwrites = array(
        'output_handler=',
        'open_basedir=',
        'disable_functions=',
        'output_buffering=Off',
        'display_errors=1',
        'log_errors=0',
        'html_errors=0',
        'report_memleaks=0',
        'report_zend_debug=0',
        'docref_root=',
        'docref_ext=.html',
        'error_prepend_string=',
        'error_append_string=',
        'auto_prepend_file=',
        'auto_append_file=',
        'xdebug.default_enable=0',
        'allow_url_fopen=1',
    )

[line 59]


Type:   mixed


[ Top ]

$tests_count =

[line 50]


Type:   mixed


[ Top ]

$xdebug_loaded =

[line 51]


Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 83]

PEAR_RunTest __construct( [PEAR_Common|null $logger = null], [ $options = array()])

An object that supports the PEAR_Common->log() signature, or null

Parameters:

PEAR_Common|null   $logger   — 
   $options   — 

[ Top ]

generate_diff   [line 667]

void generate_diff( $wanted, $output, $rvalue, $wanted_re)


Parameters:

   $wanted   — 
   $output   — 
   $rvalue   — 
   $wanted_re   — 

[ Top ]

iniString2array   [line 178]

array iniString2array( string $ini_string)

Turns a PHP INI string into an array

Turns -d "include_path=/foo/bar" into this: array( 'include_path' => array( 'operator' => '-d', 'value' => '/foo/bar', ) ) Works both with quotes and without


Parameters:

string   $ini_string   —  an PHP INI string, -d "include_path=/foo/bar"

[ Top ]

run   [line 260]

string|object Returns run( string $file, [array|string $ini_settings = array()], [integer $test_number = 1])

Runs an individual test case.
  • Return: PASSED, WARNED, FAILED depending on how the test came out. PEAR Error when the tester it self fails

Parameters:

string   $file   —  The filename of the test
array|string   $ini_settings   —  INI settings to be applied to the test run
integer   $test_number   —  Number what the current running test is of the whole test suite being runned.

[ Top ]

runPHPUnit   [line 228]

void runPHPUnit( $file, [ $ini_settings = ''])


Parameters:

   $file   — 
   $ini_settings   — 

[ Top ]

save_text   [line 694]

void save_text( $filename, $text)


Parameters:

   $filename   — 
   $text   — 

[ Top ]

settings2array   [line 191]

void settings2array( $settings, $ini_settings)


Parameters:

   $settings   — 
   $ini_settings   — 

[ Top ]

settings2params   [line 204]

void settings2params( $ini_settings)


Parameters:

   $ini_settings   — 

[ Top ]

system_with_timeout   [line 111]

unknown system_with_timeout( string $commandline, [array $env = null], [string $stdin = null])

Taken from php-src/run-tests.php

Parameters:

string   $commandline   —  command name
array   $env   — 
string   $stdin   —  standard input to pass to the command

[ Top ]


Documentation generated on Sun, 19 Apr 2020 14:22:14 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.