[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/tests_runner/src/ -> lmbDetachedFixture.class.php (source)

   1  <?php
   2  /*
   3   * Limb PHP Framework
   4   *
   5   * @link http://limb-project.com 
   6   * @copyright  Copyright &copy; 2004-2007 BIT(http://bit-creative.com)
   7   * @license    LGPL http://www.gnu.org/copyleft/lesser.html 
   8   */
   9  
  10  /**

  11   * class lmbDetachedFixture.

  12   *

  13   * @package tests_runner

  14   * @version $Id: lmbDetachedFixture.class.php 5945 2007-06-06 08:31:43Z pachanga $

  15   */
  16  class lmbDetachedFixture
  17  {
  18    protected $_setup;
  19    protected $_teardown;
  20    protected $_container = array();
  21  
  22    function __construct($setup, $teardown)
  23    {
  24      $this->_setup = $setup;
  25      $this->_teardown = $teardown;
  26    }
  27  
  28    function setUp()
  29    {
  30      if(file_exists($this->_setup))
  31        include($this->_setup);
  32    }
  33  
  34    function tearDown()
  35    {
  36      if(file_exists($this->_teardown))
  37        include($this->_teardown);
  38    }
  39  
  40    function __set($name, $value)
  41    {
  42      $this->_container[$name] = $value;
  43    }
  44  
  45    function __get($name)
  46    {
  47      if(isset($this->_container[$name]))
  48        return $this->_container[$name];
  49    }
  50  }
  51  ?>


Generated: Tue Dec 2 03:54:09 2008 Cross-referenced by PHPXref 0.7