当前位置: 首页>>代码示例>>PHP>>正文


PHP SimpleTestOptions类代码示例

本文整理汇总了PHP中SimpleTestOptions的典型用法代码示例。如果您正苦于以下问题:PHP SimpleTestOptions类的具体用法?PHP SimpleTestOptions怎么用?PHP SimpleTestOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了SimpleTestOptions类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

 function &_getRegistry()
 {
     static $registry = false;
     if (!$registry) {
         $registry = SimpleTestOptions::_getDefaults();
     }
     return $registry;
 }
开发者ID:BackupTheBerlios,项目名称:phpbase-svn,代码行数:8,代码来源:options.php

示例2: AllTests

 function AllTests() {
     $this->GroupTest('All tests for SimpleTest ' . SimpleTestOptions::getVersion());
     $this->AddTestCase(new UnitTests());
     $this->addTestFile('shell_test.php');
     $this->addTestFile('live_test.php');
     $this->addTestFile('acceptance_test.php');
     $this->addTestFile('real_sites_test.php');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:8,代码来源:all_tests.php

示例3: mock_root_object

***********************************************************************************/
require_once LIMB_DIR . 'core/lib/db/db_factory.class.php';
require_once LIMB_DIR . 'core/model/site_objects/site_object.class.php';
require_once LIMB_DIR . 'core/model/site_object_factory.class.php';
class mock_root_object extends site_object
{
    function mock_root_object()
    {
        parent::site_object();
    }
    function _define_class_properties()
    {
        return array('can_be_parent' => 1);
    }
}
SimpleTestOptions::ignore('test_site_object_template');
class test_site_object_template extends UnitTestCase
{
    var $db = null;
    var $object = null;
    var $parent_node_id = '';
    var $sub_node_id = '';
    function test_site_object_template()
    {
        $this->db =& db_factory::instance();
        parent::UnitTestCase();
    }
    function &_create_site_object()
    {
        return null;
    }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:__site_object_template.test.php

示例4: ignore

<?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: CacheRegistryTest.class.php 1340 2005-05-31 15:01:35Z pachanga $
*
***********************************************************************************/
SimpleTestOptions :: ignore('CacheBaseTest');

// NOTE: abstract class
class CacheBaseTest extends LimbTestCase
{
  var $cache;

  function &_createPersisterImp()
  {
    return null;
  }

  function setUp()
  {
    $this->cache =& $this->_createPersisterImp();
    $this->cache->flushAll();
  }

  function testGetId()
  {
    $this->assertNotNull($this->cache->getId());
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:CacheBaseTest.class.php

示例5: getPartialMockCode

 /**
  *    Accessor for additional partial mock code.
  *    @return string       Extra code.
  *    @access public
  */
 function getPartialMockCode()
 {
     $registry =& SimpleTestOptions::_getRegistry();
     return $registry['AdditionalPartialMockCode'];
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:10,代码来源:options.php

示例6: _createGroupFromClasses

 function _createGroupFromClasses($title, $classes)
 {
     $group = new GroupTest($title);
     foreach ($classes as $class) {
         if (SimpleTestOptions::isIgnored($class)) {
             continue;
         }
         $group->addTestClass($class);
     }
     return $group;
 }
开发者ID:BackupTheBerlios,项目名称:phpbase-svn,代码行数:11,代码来源:simple_test.php

示例7: do_filter

*
* $Id$
*
***********************************************************************************/
require_once LIMB_DIR . '/core/lib/util/dataspace.class.php';
class NullClass
{
}
class Filter
{
    function do_filter()
    {
    }
}
Mock::generate('Filter', 'MockFilter');
SimpleTestOptions::ignore('dataspace_test');
class dataspace_test extends UnitTestCase
{
    var $dataspace;
    var $filter;
    function setUp()
    {
        $this->dataspace = new dataspace();
    }
    function tearDown()
    {
        unset($this->dataspace);
    }
    function test_instance()
    {
        $d1 =& dataspace::instance('test');
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:dataspace_test.class.php

示例8: SimpleSanitizerTest

<?php

/**
 * Copyright (c) Xerox Corporation, Codendi Team, 2001-2009. All rights reserved
 * 
 * 
 *
 * abstract
 */
class SanitizerTestCase extends UnitTestCase
{
    function SimpleSanitizerTest($test_name = false)
    {
        $this->UnitTestCase($test_name);
    }
    function testSanitize()
    {
        trigger_error("testSanitize() not yet implemented");
    }
}
//We just tells SimpleTest to always ignore this testcase
SimpleTestOptions::ignore('SanitizerTestCase');
开发者ID:pombredanne,项目名称:tuleap,代码行数:22,代码来源:SanitizerTestCase.class.php

示例9:

 *
 * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
 *
 *  Licensed under The Open Group Test Suite License
 *  Redistributions of files must retain the above copyright notice.
 *
 * @filesource
 * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
 * @link          https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
 * @package       cake
 * @subpackage    cake.cake.tests.lib
 * @since         CakePHP(tm) v 1.2.0.4433
 * @version       $Revision$
 * @modifiedby    $LastChangedBy$
 * @lastmodified  $Date$
 * @license       http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
 */
/**
 * Short description
 */
SimpleTestOptions::ignore('CakeWebTestCase');
/**
 * Short description for class.
 *
 * @package       cake
 * @subpackage    cake.cake.tests.lib
 */
class CakeWebTestCase extends WebTestCase
{
}
开发者ID:afzet,项目名称:connectivo-crm,代码行数:31,代码来源:cake_web_test_case.php

示例10: require_once

<?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$
*
***********************************************************************************/
require_once(LIMB_DIR . '/class/core/Dataspace.class.php');

SimpleTestOptions :: ignore('DataspaceTest');

class DataspaceTest extends LimbTestCase
{
  var $dataspace;
  var $filter;

  function setUp()
  {
    $this->dataspace = new Dataspace();
  }

  function tearDown()
  {
    unset($this->dataspace);
  }

  function testGetUnsetVariable()
  {
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:DataspaceTest.class.php

示例11: setMockBaseClass

 /**
  *    @deprecated
  */
 function setMockBaseClass($mock_base = false) {
     SimpleTestOptions::setMockBaseClass($mock_base);
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:6,代码来源:mock_objects.php

示例12: getComponentAdapterType

<?php

SimpleTestOptions::ignore('AbstractComponentAdapterTestCase');
abstract class AbstractComponentAdapterTestCase extends UnitTestCase
{
    protected abstract function getComponentAdapterType();
    protected function getDefaultPico()
    {
        return new DefaultPicoContainer($this->createDefaultComponentAdapterFactory());
    }
    function testDEF_createsNewInstanceWithoutParams()
    {
        $picoContainer = $this->getDefaultPico();
        $componentAdapter = $this->prepDEF_createsNewInstanceWithoutParams();
        $this->assertEqual($this->getComponentAdapterType(), get_class($componentAdapter));
        $this->assertNotNull($componentAdapter->getComponentInstance($picoContainer));
    }
    function testDEF_createsNewInstanceWithConstantParamAndWithHint()
    {
        $picoContainer = $this->getDefaultPico();
        $componentAdapter = $this->prepDEF_createsNewInstanceWithConstantParamAndWithHint();
        $this->assertNotNull($ci = $componentAdapter->getComponentInstance($picoContainer));
    }
}
class SetterInjectionComponentAdapterTestCase extends AbstractComponentAdapterTestCase
{
    protected function getComponentAdapterType()
    {
        return 'SetterInjectionComponentAdapter';
    }
    protected function createDefaultComponentAdapterFactory()
开发者ID:smmckay,项目名称:picocontainer,代码行数:31,代码来源:SetterInjectionComponentAdapterTestCase.php

示例13: tearDown

<?php

/**********************************************************************************
* Copyright 2004 BIT, Ltd. http://www.0x00.ru, mailto: bit@0x00.ru
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/
require_once LIMB_DIR . 'core/tree/tree.class.php';
require_once LIMB_DIR . 'core/lib/db/db_factory.class.php';
require_once LIMB_DIR . 'core/fetcher.class.php';
require_once LIMB_DIR . 'tests/cases/db_test.class.php';
SimpleTestOptions::ignore('limb_test');
class limb_test extends db_test
{
    function limb_test()
    {
        parent::db_test();
    }
    function tearDown()
    {
        parent::tearDown();
        $user =& user::instance();
        $user->logout();
    }
    function _login_user($id, $groups)
    {
        $user =& user::instance();
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:limb_test.class.php

示例14: array

<?php

/**********************************************************************************
* Copyright 2004 BIT, Ltd. http://www.0x00.ru, mailto: bit@0x00.ru
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/
require_once LIMB_DIR . 'core/lib/db/db_factory.class.php';
SimpleTestOptions::ignore('test_db_case');
class test_db_case extends UnitTestCase
{
    var $db = null;
    var $dump_file = '';
    var $tables_list = array();
    var $table_records = array();
    var $sql_array = array();
    function test_db_case()
    {
        $this->db =& db_factory::instance();
        parent::UnitTestCase();
    }
    function _clean_up()
    {
        foreach ($this->tables_list as $table) {
            $this->db->sql_delete($table);
        }
    }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:test_db_case.php

示例15: AllTests

 function AllTests()
 {
     $this->GroupTest("All tests for SimpleTest " . SimpleTestOptions::getVersion());
     $this->AddTestCase(new UnitTests());
     $this->AddTestCase(new BoundaryTests());
 }
开发者ID:printedheart,项目名称:iwfms,代码行数:6,代码来源:all_tests.php


注:本文中的SimpleTestOptions类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。