コード例 #1
0
  static public function instance()
  {
    if (!self :: $_instance)
      self :: $_instance = new PackagesInfo();

    return self :: $_instance;
  }
コード例 #2
0
  function tearDown()
  {
    DebugMock :: tally();

    unset($this->resolver);

    clearTestingIni();

    PackagesInfo :: instance()->reset();
  }
コード例 #3
0
function loadPackagesTags()
{
  $info = PackagesInfo :: instance();
  $packages = $info->getPackages();

  foreach($packages as $package)
  {
    loadTagsFromDirectory($package['path'] . '/template/tags/');
  }
}
コード例 #4
0
  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;
  }
コード例 #5
0
ファイル: setup.php プロジェクト: BackupTheBerlios/limb-svn
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);

?>
コード例 #6
0
 function _loadPackages()
 {
   include_once(LIMB_DIR . '/core/PackagesInfo.class.php');
   $inst =& PackagesInfo :: instance();
   $inst->loadPackages();
 }
コード例 #7
0
 function PackageFileResolver()
 {
   $this->_packages_info =& PackagesInfo :: instance();
 }
コード例 #8
0
ファイル: index.php プロジェクト: BackupTheBerlios/limb-svn
<?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();

?>
コード例 #9
0
 function testInstance()
 {
   $this->assertTrue(PackagesInfo :: instance() === PackagesInfo :: instance());
 }
コード例 #10
0
 protected function _loadPackages()
 {
   include_once(LIMB_DIR . '/class/core/PackagesInfo.class.php');
   PackagesInfo :: instance()->loadPackages();
 }
コード例 #11
0
 function __construct()
 {
   $this->_packages_info = PackagesInfo :: instance();
 }