* @license PHP License * @package WB * @subpackage unittest */ /** * Simple test class * * * @version 0.1.0 * @package WB * @subpackage unittest */ class WBUTClazz extends WBStdClass { /** * see whether static constructor was calles */ static protected $setup = 0; /** * see whether static constructor was calles */ static protected $count = 0; /** * Static constructor * * Call this only once! */ static public function staticConstruct() { ++self::$setup; } /** * constructor * * increase counter */ public function __construct() { ++self::$count; } /** * destruct * * decrease counter */ public function __destruct() { --self::$count; } /** * fetch setup counter * * @return int */ public static function getSetup() { return self::$setup; } /** * fetch instance counter * * @return int */ public static function getCount() { return self::$count; } } ?>