• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP SimpleTestOptions类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了SimpleTestOptions类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: [email protected]
*
* 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: [email protected]
*
* 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: [email protected]
*
* 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: [email protected]
*
* 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


示例16: testInitialArray

        $col2->add($b);
        $this->assertFalse($col1->equals($col2));
    }
    function testInitialArray()
    {
        $a = new StdClass();
        $a->toto = 1;
        $b = new StdClass();
        $b->toto = 2;
        $arr = array();
        $arr[] = $a;
        $arr[] = $b;
        $col = new $this->collection_class_name($arr);
        $this->assertTrue($col->contains($a));
        $this->assertTrue($col->contains($b));
    }
    function testRemove()
    {
        $a = new StdClass();
        $col = new $this->collection_class_name();
        $col->add($a);
        $this->assertTrue($col->contains($a));
        $this->assertTrue($col->remove($a));
        $this->assertFalse($col->contains($a));
        $col->remove($a);
        $this->assertFalse($col->remove($a));
    }
}
//We just tells SimpleTest to always ignore this testcase
SimpleTestOptions::ignore('CollectionTestCase');
开发者ID:pombredanne,项目名称:tuleap,代码行数:30,代码来源:CollectionTestCase.class.php


示例17: ignore

<?php
/**********************************************************************************
* Copyright 2004 BIT, Ltd. http://limb-project.com, mailto: [email protected]
*
* Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html)
***********************************************************************************
*
* $Id$
*
***********************************************************************************/
@define('PHP_IMAGE_DIR_C', LIMB_DIR . '/core/image/');

SimpleTestOptions :: ignore('ImageLibraryTest');

class ImageLibraryTest extends LimbTestCase
{
  var $library = null;
  var $input_file = '';
  var $output_file = '';

  function setUp()
  {
    $this->input_file = LIMB_DIR . '/tests/cases/image/images/input.jpg';
    $this->output_file = VAR_DIR . '/output.jpg';

  if(!file_exists($this->output_file))
    touch($this->output_file);

    $input_type = 'jpeg';
    $output_type = 'jpeg';
    $this->library->setInputFile($this->input_file, $input_type);
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:ImageLibraryTest.class.php


示例18: paintFooter

 /**
  * Output anything that should appear below all the test output, e.g. summary information.
  */
 function paintFooter($test_name)
 {
     $summarydata = new stdClass();
     $summarydata->run = $this->getTestCaseProgress();
     $summarydata->total = $this->getTestCaseCount();
     $summarydata->passes = $this->getPassCount();
     $summarydata->fails = $this->getFailCount();
     $summarydata->exceptions = $this->getExceptionCount();
     if ($summarydata->fails == 0 && $summarydata->exceptions == 0) {
         $status = "passed";
     } else {
         $status = "failed";
     }
     echo '<div class="unittestsummary ', $status, '">';
     echo $this->get_string('summary', $summarydata);
     echo '</div>';
     echo '<div class="performanceinfo">', $this->get_string('runat', userdate($this->timestart)), ' ', $this->get_string('timetakes', format_time(time() - $this->timestart)), ' ', $this->get_string('version', SimpleTestOptions::getVersion()), '</div>';
 }
开发者ID:nigeldaley,项目名称:moodle,代码行数:21,代码来源:ex_reporter.php


示例19: ignore

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


示例20: html_hilight_test_unslash

<?php

require_once DOKU_INC . 'inc/html.php';
if (!extension_loaded('runkit')) {
    SimpleTestOptions::ignore('html_hilight_test');
    trigger_error('Skipping html_hilight_test - http://www.php.net/runkit required');
}
function html_hilight_test_unslash($string, $char = "'")
{
    $str = str_replace('\\' . $char, $char, $string);
    return $str;
}
class html_hilight_test extends UnitTestCase
{
    function setup()
    {
        if (function_exists('unslash')) {
            runkit_function_rename('unslash', 'html_hilight_test_unslash_real');
        }
        runkit_function_rename('html_hilight_test_unslash', 'unslash');
    }
    function teardown()
    {
        runkit_function_rename('unslash', 'html_hilight_test_unslash');
        if (function_exists('html_hilight_test_unslash_real')) {
            runkit_function_rename('html_hilight_test_unslash_real', 'unslash');
        }
    }
    function testHighlightOneWord()
    {
        $html = 'Foo bar Foo';
开发者ID:stretchyboy,项目名称:dokuwiki,代码行数:31,代码来源:html_hilight.test.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP SimpleUrl类代码示例发布时间:2022-05-23
下一篇:
PHP SimpleTestCompatibility类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap