constructor PEAR_RunTest::
PEAR_RunTest
(Previous)
(Next) PEAR_RunTest::run

View this page in Last updated: Sun, 31 Aug 2008
English | Dutch | French | German | Hungarian | Japanese | Polish | Plain HTML

PEAR_RunTest::generate_diff()

PEAR_RunTest::generate_diff()  -- generate_diff

Description

Returns differences by line between the expected output ($wanted) and the actual output ($output). In addition, the value returned from the script can also be tested. The test should be performed outside generate_diff(). If the return value is as expected, pass in FALSE, otherwise pass in an array where the first element is the expected return value and the second is the actual return value.

Parameter

string $wanted

Expected output

string $output

Actual output

array|FALSE $return_value

False if return value was correct, otherwise an array of format:


<?php
array(
    1// expected return
    2// actual return value
);
?>

Throws

throws no exceptions thrown

Note

This function can not be called statically.

constructor PEAR_RunTest::
PEAR_RunTest
(Previous)
(Next) PEAR_RunTest::run

Download Documentation Last updated: Sun, 31 Aug 2008
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.