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

Source for file TestClass.php

Documentation is available at TestClass.php

  1. <?php
  2. // Call {className}Test::main() if this source file is executed directly.
  3. if (!defined("PHPUnit2_MAIN_METHOD")) {
  4.     define("PHPUnit2_MAIN_METHOD""{className}Test::main");
  5. }
  6.  
  7. require_once "PHPUnit2/Framework/TestCase.php";
  8. require_once "PHPUnit2/Framework/TestSuite.php";
  9.  
  10. require_once "{classFile}";
  11.  
  12. /**
  13.  * Test class for {className}.
  14.  * Generated by PHPUnit2_Util_Skeleton on {date} at {time}.
  15.  */
  16. class {className}Test extends PHPUnit2_Framework_TestCase {
  17.     /**
  18.      * Runs the test methods of this class.
  19.      *
  20.      * @access public
  21.      * @static
  22.      */
  23.     public static function main({
  24.         require_once "PHPUnit2/TextUI/TestRunner.php";
  25.  
  26.         $suite  = new PHPUnit2_Framework_TestSuite("{className}Test");
  27.         $result PHPUnit2_TextUI_TestRunner::run($suite);
  28.     }
  29.  
  30.     /**
  31.      * Sets up the fixture, for example, open a network connection.
  32.      * This method is called before a test is executed.
  33.      *
  34.      * @access protected
  35.      */
  36.     protected function setUp({
  37.     }
  38.  
  39.     /**
  40.      * Tears down the fixture, for example, close a network connection.
  41.      * This method is called after a test is executed.
  42.      *
  43.      * @access protected
  44.      */
  45.     protected function tearDown({
  46.     }
  47. {methods}}
  48.  
  49. // Call {className}Test::main() if this source file is executed directly.
  50. if (PHPUnit2_MAIN_METHOD == "{className}Test::main"{
  51.     {className}Test::main();
  52. }
  53. ?>

Documentation generated on Mon, 11 Mar 2019 14:40:40 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.