Source of: /manual/en/internals2.structure.tests.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/internals2.structure.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'internals2.structure.tests.php',
1 => 'Testing an extension',
),
'up' =>
array (
0 => 'internals2.structure.php',
1 => 'Extension structure',
),
'prev' =>
array (
0 => 'internals2.structure.lifecycle.php',
1 => 'Life cycle of an extension',
),
'next' =>
array (
0 => 'internals2.memory.php',
1 => 'Memory management',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="internals2.structure.tests" class="sect1">
<h2 class="title">Testing an extension</h2>
<p class="simpara">
One of the accepted requirements of good programming is testing. PHP provides
a test harness for unit regression tests, in the form of a script called
<strong class="command">run-tests.php</strong>.
</p>
<p class="simpara">
Tests for a particular module are stored in the <var class="filename">tests/</var>
subdirectory of the module's folder, and have a <var class="filename">.phpt</var>
extension. For details of the PHPT format, see
<a href="http://qa.php.net/" class="link external">» http://qa.php.net/</a>.
</p>
</div><?php manual_footer(); ?>