static public function instance() { if (!self :: $_instance) self :: $_instance = new PackagesInfo(); return self :: $_instance; }
function tearDown() { DebugMock :: tally(); unset($this->resolver); clearTestingIni(); PackagesInfo :: instance()->reset(); }
function loadPackagesTags() { $info = PackagesInfo :: instance(); $packages = $info->getPackages(); foreach($packages as $package) { loadTagsFromDirectory($package['path'] . '/template/tags/'); } }
function &getTestCasesHandlesFromPackages() { $finder = new TestFinder(); $info =& PackagesInfo :: instance(); $packages = $info->getPackages(); $handles = array(); foreach($packages as $package) { $files = $finder->_getFileList($package['path'] . '/tests/', array(&$finder, '_isTestCaseFile')); $handles = array_merge($handles, $finder->_getTestCasesHandlesFromFilesList($files)); } return $handles; }
include_once(LIMB_DIR . '/class/core/file_resolvers/BehaviourFileResolver.class.php'); include_once(LIMB_DIR . '/class/core/file_resolvers/DatasourceFileResolver.class.php'); include_once(LIMB_DIR . '/class/core/file_resolvers/SiteObjectFileResolver.class.php'); include_once(LIMB_DIR . '/class/core/file_resolvers/TemplateFileResolver.class.php'); registerFileResolver('ini', LIMB_DIR . '/tests/lib/testsIniFileResolver'); registerFileResolver('action', LIMB_DIR . '/tests/lib/testsActionFileResolver'); registerFileResolver('strings', LIMB_DIR . '/tests/lib/testsStringsFileResolver'); registerFileResolver('db_table', new DbTableFileResolver(new PackageFileResolver())); registerFileResolver('template', new TemplateFileResolver(new PackageFileResolver())); registerFileResolver('behaviour', new BehaviourFileResolver(new PackageFileResolver())); registerFileResolver('datasource', new DatasourceFileResolver(new PackageFileResolver())); registerFileResolver('site_object', new SiteObjectFileResolver(new PackageFileResolver())); require_once(LIMB_DIR . '/tests/setup_SimpleTest.inc.php'); require_once(LIMB_DIR . '/tests/lib/test_utils.php'); require_once(LIMB_DIR . '/tests/cases/LimbTestCase.class.php'); require_once(LIMB_DIR . '/tests/lib/TestFinder.class.php'); require_once(LIMB_DIR . '/class/lib/error/error.inc.php'); require_once(LIMB_DIR . '/class/core/PackagesInfo.class.php'); require_once(LIMB_DIR . '/class/core/Limb.class.php'); require_once(LIMB_DIR . '/class/core/BaseLimbToolkit.class.php'); Limb :: registerToolkit(new BaseLimbToolkit()); PackagesInfo :: instance()->loadPackages();//??? set_time_limit(0); error_reporting(E_ALL); ?>
function _loadPackages() { include_once(LIMB_DIR . '/core/PackagesInfo.class.php'); $inst =& PackagesInfo :: instance(); $inst->loadPackages(); }
function PackageFileResolver() { $this->_packages_info =& PackagesInfo :: instance(); }
<?php /********************************************************************************** * Copyright 2004 BIT, Ltd. http://limb-project.com, mailto: support@limb-project.com * * Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html) *********************************************************************************** * * $Id$ * ***********************************************************************************/ ob_start(); require_once(dirname(__FILE__) . '/setup.php'); require_once(dirname(__FILE__) . '/LimbRootGroupTest.class.php'); require_once(dirname(__FILE__) . '/lib/HtmlTestRunner.class.php'); $inst =& PackagesInfo :: instance(); $inst->loadPackages();//??? $root_group = new LimbRootGroupTest(); $test_runner = new HTMLTestRunner(); $test_runner->run($root_group); ob_end_flush(); ?>
function testInstance() { $this->assertTrue(PackagesInfo :: instance() === PackagesInfo :: instance()); }
protected function _loadPackages() { include_once(LIMB_DIR . '/class/core/PackagesInfo.class.php'); PackagesInfo :: instance()->loadPackages(); }
function __construct() { $this->_packages_info = PackagesInfo :: instance(); }