本文整理汇总了PHP中AllTests类的典型用法代码示例。如果您正苦于以下问题:PHP AllTests类的具体用法?PHP AllTests怎么用?PHP AllTests使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AllTests类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: suite
/**
* Build the test suite.
*
* @return PHPUnit_Framework_TestSuite
* @access public
*/
public static function suite()
{
$suite = new AllTests('VuFind');
$suite->addTest(SeleniumAllTests::suite());
$suite->addTest(WebAllTests::suite());
return $suite;
}
示例2: suite
public static function suite()
{
$suite = new AllTests('Models');
$suite->addTest(User_AllTests::suite());
$suite->addTest(Element_AllTests::suite());
$suite->addTest(Webservice_AllTests::suite());
return $suite;
}
示例3: suite
/**
* TestSuite
*/
public static function suite()
{
$suite = new AllTests('PHPUnit');
$base = dirname(__FILE__);
$files = sfFinder::type('file')->name('*Test.php')->in(array(DIR . '/plugins/sfPhpunitPlugin/test', $base . '/unit', $base . '/functional'));
foreach ($files as $file) {
$suite->addTestFile($file);
}
return $suite;
}
示例4: suite
/**
* TestSuite
*/
public static function suite()
{
$suite = new AllTests('EasyFinance');
$base = dirname(__FILE__);
$files = sfFinder::type('file')->name('*Test.php')->in(array($base . '/unit', $base . '/functional'));
$suite->addTest(EasyFinance_Unit_AllTests::suite());
foreach ($files as $file) {
$suite->addTestFile($file);
}
return $suite;
}
示例5: suite
public static function suite()
{
$suite = new PHPUnit_Framework_TestSuite('ErdikoTests');
$testFiles = AllTests::_getTestFiles();
foreach ($testFiles as $file) {
$suite->addTestFile($file);
}
return $suite;
}
示例6: foreach
$_SERVER['argv'][2] = $metaDir . 'config.meta.xml';
$_SERVER['argv'][] = '--force';
$_SERVER['argv'][] = '--no-schema-check';
$_SERVER['argv'][] = '--drop-stale-files';
include $path;
AutoloaderPool::get('onPHP')->addPaths(array(ONPHP_META_AUTO_BUSINESS_DIR, ONPHP_META_AUTO_DAO_DIR, ONPHP_META_AUTO_PROTO_DIR, ONPHP_META_DAO_DIR, ONPHP_META_BUSINESS_DIR, ONPHP_META_PROTO_DIR));
$dBCreator = DBTestCreator::create()->setSchemaPath(ONPHP_META_AUTO_DIR . 'schema.php')->setTestPool(DBTestPool::me());
$out = MetaConfiguration::me()->getOutput();
foreach (DBTestPool::me()->getPool() as $connector => $db) {
DBPool::me()->setDefault($db);
$out->info('Using ')->info(get_class($db), true)->infoLine(' connector.');
$dBCreator->dropDB(true);
$dBCreator->createDB()->fillDB();
MetaConfiguration::me()->checkIntegrity();
$out->newLine();
$dBCreator->dropDB();
}
DBPool::me()->dropDefault();
}
foreach (self::$paths as $testPath) {
foreach (glob($testPath . '*Test' . EXT_CLASS, GLOB_BRACE) as $file) {
$suite->addTestFile($file);
}
}
return $suite;
}
}
AllTests::$dbs = $dbs;
AllTests::$paths = $testPathes;
AllTests::$workers = $daoWorkers;
示例7: dirname
<?php
/* ***********************************************************************************************
*
* Phoebius Framework
*
* **********************************************************************************************
*
* Copyright (c) 2009 Scand Ltd.
*
* This program is free software; you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Foundation;
* either version 3 of the License, or (at your option) any later version.
*
* You should have received a copy of the GNU Lesser General Public License along with
* this program; if not, see <http://www.gnu.org/licenses/>.
*
************************************************************************************************/
require dirname(__FILE__) . '/appless.init.php';
// This is needed because ZendPhpUnit launcher does not check the indexes of
// arrays it accesses to :( any access to unexistant index throws an exception
// TODO 1: add halt/unhalt() method pair to avoid direct register()/unregister() calls
// (such calls are expensive)
// TODO 2: add "kernel" mode - an abstraction over Exceptionizer::halt()/unhalt()
Exceptionizer::getInstance()->unregister();
AllTests::$testPaths = array(PHOEBIUS_BASE_ROOT . DIRECTORY_SEPARATOR . 'tests');
set_include_path(PHOEBIUS_BASE_ROOT . DIRECTORY_SEPARATOR . 'tests' . PATH_SEPARATOR . get_include_path());
示例8: define
<?php
// $Id$
if (!defined('TEST')) {
define('TEST', __FILE__);
}
require_once dirname(__FILE__) . '/test_groups.php';
require_once dirname(__FILE__) . '/../reporter.php';
$test = new AllTests();
if (SimpleReporter::inCli()) {
$result = $test->run(new SelectiveReporter(new TextReporter(), @$argv[1], @$argv[2]));
return $result ? 0 : 1;
}
$test->run(new SelectiveReporter(new HtmlReporter(), @$_GET['c'], @$_GET['t']));
示例9: Testsuite_registerTests
function Testsuite_registerTests($name)
{
AllTests::addTestsuite($name);
}
示例10: suite
public static function suite()
{
$suite = new AllTests();
// Append all HAR Viewer tests into the suite.
$suite->addTestSuite("HAR_Test1");
$suite->addTestSuite("HAR_TestExamples");
$suite->addTestSuite("HAR_TestPageListService");
$suite->addTestSuite("HAR_TestPreviewSource");
$suite->addTestSuite("HAR_TestRemoteLoad");
$suite->addTestSuite("HAR_TestLoadMultipleFiles");
$suite->addTestSuite("HAR_TestNoPageLog");
$suite->addTestSuite("HAR_TestPageTimings");
$suite->addTestSuite("HAR_TestSchemaTab");
$suite->addTestSuite("HAR_TestRequestBody");
$suite->addTestSuite("HAR_TestRemoveTab");
$suite->addTestSuite("HAR_TestHideTabBar");
$suite->addTestSuite("HAR_TestShowStatsAndTimeline");
$suite->addTestSuite("HAR_TestCustomPageTiming");
$suite->addTestSuite("HAR_TestRemoveToolbarButton");
$suite->addTestSuite("HAR_TestTimeStamps");
$suite->addTestSuite("HAR_TestPhases");
//$suite->addTestSuite("HAR_TestLoadHarAPI");
$suite->addTestSuite("HAR_TestNoPageGraph");
$suite->addTestSuite("HAR_TestEmbeddedPreview");
$suite->addTestSuite("HAR_TestCustomizeColumns");
$suite->addTestSuite("HAR_TestSearchHAR");
$suite->addTestSuite("HAR_TestPreviewExpand");
$suite->addTestSuite("HAR_TestEmbeddedInvalidPreview");
$suite->addTestSuite("HAR_TestSearchJsonQuery");
return $suite;
}
示例11: getConnection
/**
* Create database connection for this instance
*
* @return PHPUnit_Extensions_Database_DB_IDatabaseConnection connection
*/
protected function getConnection()
{
AllTests::installDB();
return $this->createDefaultDBConnection(AllTests::$utils->pdo, 'civicrm_tests_dev');
}
示例12: paintPass
return parent::_getCss() . ' .pass { color: green; }';
}
}
class ShowSimplePasses extends TextReporter
{
var $lastfile = '';
function paintPass($message)
{
parent::paintPass($message);
$breadcrumb = $this->getTestList();
array_shift($breadcrumb);
if ($this->lastfile != $breadcrumb[0]) {
print "{$breadcrumb['0']}\n";
$this->lastfile = $breadcrumb[0];
}
array_shift($breadcrumb);
print "\t" . implode(":", $breadcrumb) . ": OK\n";
//print ": $message\n";
}
}
class AllTests extends TestSuite
{
function AllTests()
{
$this->TestSuite('All tests');
$this->addFile('tests/activerecord.php');
// $this->addFile('tests/livetest.php');
}
}
$test = new AllTests();
$test->run(new ShowSimplePasses());
示例13: define
<?php
/**
Copyright 2011-2015 Nick Korbel
This file is part of Booked Scheduler.
Booked Scheduler is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Booked Scheduler is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Booked Scheduler. If not, see <http://www.gnu.org/licenses/>.
*/
define('ROOT_DIR', dirname(__FILE__) . '/../');
require_once ROOT_DIR . 'tests/AllTests.php';
$suite = AllTests::suite();
$suite->run();
示例14: define
<?php
// $Id: all_tests.php,v 1.2 2004/08/16 08:55:24 hfuecks Exp $
require_once 'simple_include.php';
require_once 'calendar_include.php';
define("TEST_RUNNING", true);
require_once './calendar_tests.php';
require_once './calendar_tabular_tests.php';
require_once './validator_tests.php';
require_once './calendar_engine_tests.php';
require_once './calendar_engine_tests.php';
require_once './table_helper_tests.php';
require_once './decorator_tests.php';
require_once './util_tests.php';
class AllTests extends GroupTest
{
function AllTests()
{
$this->GroupTest('All PEAR::Calendar Tests');
$this->AddTestCase(new CalendarTests());
$this->AddTestCase(new CalendarTabularTests());
$this->AddTestCase(new ValidatorTests());
$this->AddTestCase(new CalendarEngineTests());
$this->AddTestCase(new TableHelperTests());
$this->AddTestCase(new DecoratorTests());
$this->AddTestCase(new UtilTests());
}
}
$test = new AllTests();
$test->run(new HtmlReporter());
示例15: suite
public static function suite()
{
$suite = new AllTests();
$tdir = dirname(__FILE__);
$suite->addTestFile($tdir . '/BookmarkTest.php');
$suite->addTestFile($tdir . '/Bookmark2TagTest.php');
$suite->addTestFile($tdir . '/Tag2TagTest.php');
$suite->addTestFile($tdir . '/TagsCacheTest.php');
$suite->addTestFile($tdir . '/CommonDescriptionTest.php');
$suite->addTestFile($tdir . '/SearchHistoryTest.php');
$suite->addTestFile($tdir . '/TagTest.php');
$suite->addTestFile($tdir . '/VoteTest.php');
$suite->addTestFile($tdir . '/UserTest.php');
$suite->addTestFile($tdir . '/Api/ExportCsvTest.php');
$suite->addTestFile($tdir . '/Api/OpenSearchTest.php');
$suite->addTestFile($tdir . '/Api/PostsAddTest.php');
$suite->addTestFile($tdir . '/Api/PostsDeleteTest.php');
$suite->addTestFile($tdir . '/Api/PostsUpdateTest.php');
return $suite;
}