downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

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&#039;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">&raquo; http://qa.php.net/</a>.
  </p>

 </div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites