本文整理汇总了PHP中SimpleTestOptions类的典型用法代码示例。如果您正苦于以下问题:PHP SimpleTestOptions类的具体用法?PHP SimpleTestOptions怎么用?PHP SimpleTestOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SimpleTestOptions类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
function &_getRegistry()
{
static $registry = false;
if (!$registry) {
$registry = SimpleTestOptions::_getDefaults();
}
return $registry;
}
示例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');
}
示例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;
}
示例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());
示例5: getPartialMockCode
/**
* Accessor for additional partial mock code.
* @return string Extra code.
* @access public
*/
function getPartialMockCode()
{
$registry =& SimpleTestOptions::_getRegistry();
return $registry['AdditionalPartialMockCode'];
}
示例6: _createGroupFromClasses
function _createGroupFromClasses($title, $classes)
{
$group = new GroupTest($title);
foreach ($classes as $class) {
if (SimpleTestOptions::isIgnored($class)) {
continue;
}
$group->addTestClass($class);
}
return $group;
}
示例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');
示例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');
示例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
{
}
示例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()
{
示例11: setMockBaseClass
/**
* @deprecated
*/
function setMockBaseClass($mock_base = false) {
SimpleTestOptions::setMockBaseClass($mock_base);
}
示例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()
示例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();
示例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);
}
}
示例15: AllTests
function AllTests()
{
$this->GroupTest("All tests for SimpleTest " . SimpleTestOptions::getVersion());
$this->AddTestCase(new UnitTests());
$this->AddTestCase(new BoundaryTests());
}