本文整理汇总了PHP中BaseTest类的典型用法代码示例。如果您正苦于以下问题:PHP BaseTest类的具体用法?PHP BaseTest怎么用?PHP BaseTest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BaseTest类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AdminPasswordConfirmed
function AdminPasswordConfirmed($params)
{
parent::BaseTest($params);
if (!is_array($this->params) || count($this->params) <= 0) {
ErrorStack::addError("Invalid parameters, you need to provide the password field names", ERRORSTACK_ERROR, 'AdminPasswordConfirmed');
$this->result = INSTALLER_TEST_FAIL;
return $this->result;
}
}
示例2: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
self::spawnDatacenter();
self::$server_api = new Swagger\Client\Api\ServerApi(self::$api_client);
self::$lan_api = new Swagger\Client\Api\LanApi(self::$api_client);
}
示例3: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
self::spawnDatacenter();
self::$server_api = new Swagger\Client\Api\ServerApi(self::$api_client);
self::$nic_api = new Swagger\Client\Api\NetworkInterfacesApi(self::$api_client);
}
示例4: setUpBeforeClass
public static function setUpBeforeClass()
{
if (!self::$loader) {
self::$loader = \ClassGenerator\Autoloader::getInstance()->setCachePath(__DIR__ . DIRECTORY_SEPARATOR . 'cache')->register();
self::$generator = self::$loader->getGenerator();
}
}
示例5: __construct
public function __construct()
{
parent::__construct();
$matches = array();
assert(preg_match("/host=([^;]+);(?:port=([^;]+);)?dbname=([^;]+)/", Yii::app()->db->connectionString, $matches) == 1);
// Not Coding Standard
if ($matches[2] != '') {
$this->databasePort = intval($matches[2]);
} else {
$databaseType = RedBeanDatabase::getDatabaseTypeFromDsnString(Yii::app()->db->connectionString);
$this->databasePort = DatabaseCompatibilityUtil::getDatabaseDefaultPort($databaseType);
}
$this->hostname = $matches[1];
$this->rootUsername = Yii::app()->db->username;
$this->rootPassword = Yii::app()->db->password;
$this->existingDatabaseName = $matches[3];
$this->temporaryDatabaseName = "zurmo_wacky";
if ($this->rootUsername == 'zurmo') {
$this->rootUsername = 'zurmoroot';
$this->rootPassword = 'somepass';
$this->temporaryDatabaseName = 'zurmo_wacky';
}
$this->superUserPassword = 'super';
$this->databaseBackupTestFile = INSTANCE_ROOT . '/protected/runtime/databaseBackupTest.sql';
}
示例6: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
self::spawnDatacenter();
self::$volume_api = new Swagger\Client\Api\VolumeApi(self::$api_client);
self::$snapshot_api = new Swagger\Client\Api\SnapshotApi(self::$api_client);
}
示例7: setUpBeforeClass
public static function setUpBeforeClass()
{
self::$messaging = new Messaging();
self::$messaging->authenticate(QUEUE_ACCOUNT, QUEUE_USERNAME, QUEUE_API_KEY);
self::$queues = array();
self::$topics = array();
}
示例8: setUpBeforeClass
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
SecurityTestHelper::createSuperAdmin();
$super = User::getByUsername('super');
Yii::app()->user->userModel = $super;
}
示例9: tearDownAfterClass
public static function tearDownAfterClass()
{
// Remove test file
@unlink(__DIR__ . '/test.jpg');
// Tear down parent
parent::tearDownAfterClass();
}
示例10: tearDown
public function tearDown()
{
while (($language = array_pop($this->createdLanguages)) !== null) {
$this->languageService->deleteLanguage($language);
}
parent::tearDown();
}
示例11: setUp
public function setUp()
{
parent::setUp();
$this->fsql = new Environment();
$this->fsql->define_db('db1', parent::$tempDir);
$this->fsql->select_db('db1');
}
示例12: setUp
public function setUp()
{
parent::setUp();
$fsql = new Environment();
$fsql->define_db('db1', parent::$tempDir);
$this->schema = $fsql->get_database('db1')->getSchema('public');
}
示例13: setUp
public function setUp()
{
parent::setUp();
$dir = __DIR__ . '/03/output';
if (!is_dir($dir)) {
mkdir($dir);
}
}
示例14: tearDownAfterClass
/**
* {@inheritdoc}
*/
public static function tearDownAfterClass()
{
// Remove test file
$file = __DIR__ . '/../translations/test.php';
IOHelper::deleteFile($file);
// Tear down parent
parent::tearDownAfterClass();
}
示例15: getCompanyHome
protected function getCompanyHome()
{
if (self::$_companyHome == null) {
$nodes = $this->getSession()->query($this->getStore(), 'PATH:"app:company_home"');
self::$_companyHome = $nodes[0];
}
return self::$_companyHome;
}