當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。