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


PHP Version::addTest方法代码示例

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


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

示例1: array

$version->collectPassword('db_password', 'Password', '');
$version->collectText('db_server', 'Server Address', 'localhost');
$version->collectText('db_database', 'Database Name', 'care2x');
$version->addSeparator('System Administrator User');
$version->collectText('admin_user', 'User Name', 'admin');
$version->collectPassword('admin_password', 'Password', '');
$version->collectPassword('admin_confirm', 'Password Confirm', '');
$version->addSeparator('Network Protocol and Domain');
$version->collectOption('transfer_protocol', 'Transfer Protocol', array('http', 'https'), array('http', 'https'), 'http');
$version->collectText('care2x_address', 'Care2x Host', 'localhost');
$version->addSeparator('Encryption Keys');
$version->collectText('1st_key', '1st Key', (rand(1, $rmax) . rand(1, $rmax)) * rand(1, $rmax));
$version->collectText('2nd_key', '2nd Key', (rand(1, $rmax) . rand(1, $rmax)) * rand(1, $rmax));
$version->collectText('3rd_key', '3rd Key', (rand(1, $rmax) . rand(1, $rmax)) * rand(1, $rmax));
$version->addSeparator('');
$version->addTest('PHPVersionOver', array('4.3.0'));
$version->addTest('PHPVersionUnder', array('5.0.0'));
//$version->addTest('PHPMemory', array('8M'));
//$version->addTest('PHPMagicQuotes', array('Off'));
//$version->addTest('PHPRegisterGlobals', array('Off'));
$version->addTest('PHPDBExtension', array('type_field' => 'db_type'));
$version->addTest('PHPExtension', array('calendar', 'gd'));
$version->addTest('DBVersionOver', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'type_field' => 'db_type', 'version' => array('mysql' => '3.23.0', 'postgres7' => '7.4.0')));
$version->addTest('AdminPasswordConfirmed', array('password_field' => 'admin_password', 'confirm_field' => 'admin_confirm'));
$version->addTest('WritableLocation', array(APP_PATH . '/cache'));
$version->addTest('WritableLocation', array(APP_PATH . '/cache/barcodes'));
$version->addTest('WritableLocation', array(APP_PATH . '/counter'));
$version->addTest('WritableLocation', array(APP_PATH . '/counter/hitcount.txt'));
$version->addTest('WritableLocation', array(APP_PATH . '/fotos'));
$version->addTest('WritableLocation', array(APP_PATH . '/fotos/encounter'));
$version->addTest('WritableLocation', array(APP_PATH . '/fotos/registration'));
开发者ID:tejdeeps,项目名称:tejcs.com,代码行数:31,代码来源:versions.php

示例2: realpath

 */
/*
 * Created on Aug 16, 2005
 *
 * SureInvoice version file for application installer
 */
$base_path = realpath(dirname(__FILE__) . '/../');
$versions = new VersionSet();
$versions->collectData('db_user', 'Database Username', 'text', 'root');
$versions->collectData('db_password', 'Database Password', 'text', '');
$versions->collectData('db_server', 'Database Server', 'text', 'localhost');
$versions->collectData('db_port', 'Database Port', 'text', '3306');
$versions->collectData('db_database', 'Database Name', 'text', '');
// 0.0 Release (All Required Tests and Actions)
$version_0_0 = new Version('0.0');
$version_0_0->addTest('PHPVersionOver', array('4.3.0'));
$version_0_0->addTest('PHPExtension', array('mysql', 'curl'));
$version_0_0->addTest('WritableLocation', array($base_path . '/includes/global_config.php', $base_path . '/installer/tmp'));
$version_0_0->addTest('MysqlVersionOver', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'version' => '4.1.0'));
$version_0_0->addAction('AcceptText', array($base_path . '/LICENSE'));
$version_0_0->addAction('ReplaceString', array('message' => "Saved database configuration information!", 'files' => array($base_path . '/includes/global_config.php.dist' => $base_path . '/includes/global_config.php'), 'fields' => array('INSTALL_DB_DATABASE' => 'db_database', 'INSTALL_DB_SERVER' => 'db_server', 'INSTALL_DB_USERNAME' => 'db_user', 'INSTALL_DB_PASSWORD' => 'db_password')));
$versions->add($version_0_0);
// 0.2 Release
$version_0_2 = new Version('0.2');
$version_0_2->addAction('SQLFile', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'db_field' => 'db_database', 'files' => array($base_path . '/setup/sureinvoice.sql')));
$versions->add($version_0_2);
// 0.3 Release
$version_0_3 = new Version('0.3');
$version_0_3->addAction('SQLFile', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'db_field' => 'db_database', 'files' => array($base_path . '/setup/update-0.2-0.3.sql')));
$versions->add($version_0_3);
// 0.4 Release
开发者ID:nanoprime,项目名称:sureinvoice,代码行数:31,代码来源:versions.php

示例3: VersionSet

<?php

/*
 * Created on Aug 16, 2005
 *
 * Example version file for application installer
 */
$versions = new VersionSet();
$version_0_2 = new Version('0.2');
$version_0_2->collectData('db_user', 'Database Username', 'text', 'root');
$version_0_2->collectData('db_password', 'Database Password', 'text', '');
$version_0_2->collectData('db_server', 'Database Server', 'text', 'localhost');
$version_0_2->collectData('db_port', 'Database Port', 'text', '3306');
$version_0_2->collectData('db_database', 'Database Name', 'text', '');
$version_0_2->addTest('PHPVersionOver', array('4.2.0'));
$version_0_2->addTest('PHPExtension', array('mysql', 'gd'));
$version_0_2->addTest('WritableLocation', array(dirname(__FILE__) . '/test_replacement.txt', realpath(dirname(__FILE__) . '/tmp')));
$version_0_2->addTest('MysqlVersionOver', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'version' => '4.0.1'));
$version_0_2->addAction('AcceptText', array(dirname(__FILE__) . '/LICENSE'));
$version_0_2->addAction('SQLFile', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'db_field' => 'db_database', 'files' => array(realpath(dirname(__FILE__) . '/sql') . '/sureinvoice.sql')));
$version_0_2->addAction('ReplaceString', array('message' => "Saved database configuration information!", 'files' => array(dirname(__FILE__) . '/test_replacement.txt'), 'fields' => array('INSTALL_DB_USERNAME' => 'db_user', 'INSTALL_DB_PASSWORD' => 'db_password'), 'strings' => array('TEST_STRING' => 'This is my test string text!')));
$versions->add($version_0_2);
$version_0_3 = new Version('0.3');
$version_0_3->addAction('SQLFile', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'db_field' => 'db_database', 'files' => array(realpath(dirname(__FILE__) . '/sql') . '/update-0.2-0.3.sql')));
$versions->add($version_0_3);
$version_0_4 = new Version('0.4');
$version_0_4->addAction('SQLFile', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'db_field' => 'db_database', 'files' => array(realpath(dirname(__FILE__) . '/sql') . '/update-0.3-0.4.sql')));
$versions->add($version_0_4);
?>

开发者ID:tejdeeps,项目名称:tejcs.com,代码行数:29,代码来源:example_versions.php


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