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

Source for file tmpl_code.doctest.php

Documentation is available at tmpl_code.doctest.php

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
  3.  
  4. /**
  5.  * This file is part of the PEAR Testing_DocTest package.
  6.  * 
  7.  * PHP version 5
  8.  * 
  9.  * @category  Testing
  10.  * @package   Testing_DocTest
  11.  * @author    Tobia Caneschi <tobia.caneschi@gmail.com>
  12.  * @copyright 2008 Appsfuel
  13.  * @license   http://opensource.org/licenses/mit-license.php MIT License
  14.  * @version   CVS: $Id$
  15.  * @link      http://pear.php.net/package/Testing_DocTest
  16.  * @since     Class available since release 0.1.0
  17.  * @filesource
  18.  */
  19. //Example of general framework bootstrap
  20.  
  21. //framework setup phase
  22. define('TEXT_VAR'"I'm really private");
  23.  
  24. //Needed for phpdt setup flag 
  25. %s
  26.  
  27. /**
  28.  * A tess framework .
  29.  *
  30.  * @category  Testing
  31.  * @package   Testing_DocTest
  32.  * @author    Tobia Caneschi <tobia.caneschi@gmail.com>
  33.  * @copyright 2013 xxx
  34.  * @license   xx http://license.com
  35.  * @version   Release: 0.6.0
  36.  * @link      http://pear.php.net/package/Testing_DocTest
  37.  * @since     xx
  38.  */
  39. class Foo
  40. {
  41.     /**
  42.      * Properties doc blocs do not accept doc tests.
  43.      *
  44.      * @var string $_privateVar 
  45.      * @access private
  46.      */
  47.     private $_privateVar = TEXT_VAR;
  48.    
  49.     /**
  50.      * Run method.
  51.      *
  52.      * @access public
  53.      * @return Nothing 
  54.      */
  55.     public function run(
  56.     {
  57.         //doctest code 
  58.         %s
  59.     }
  60.  
  61.     /**
  62.      * bar method.
  63.      *
  64.      * @access public
  65.      * @return Nothing 
  66.      */
  67.     public function bar(
  68.     {
  69.         return $this->_privateVar;
  70.     }
  71. }
  72.  
  73. //run phase
  74. $fm1 = new Foo();
  75. $fm1->run();
  76. ?>

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