本文整理汇总了PHP中lime_test::error方法的典型用法代码示例。如果您正苦于以下问题:PHP lime_test::error方法的具体用法?PHP lime_test::error怎么用?PHP lime_test::error使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lime_test
的用法示例。
在下文中一共展示了lime_test::error方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
<?php
require_once dirname(__FILE__) . '/../bootstrap/unit.php';
require_once dirname(__FILE__) . '/../../lib/sfDynamics.class.php';
$testCount = 1;
class ManagerMock extends sfDynamicsManager
{
}
$t = new lime_test($testCount, new lime_output_color());
$t->comment('::getManager()');
if (!sfContext::hasInstance()) {
require_once $_SERVER['SYMFONY'] . '/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();
require_once dirname(__FILE__) . '/../fixtures/project/config/ProjectConfiguration.class.php';
sfContext::createInstance(ProjectConfiguration::getApplicationConfiguration('frontend', 'test', isset($debug) ? $debug : true));
if (!sfContext::hasInstance()) {
$t->error('A context instance is required');
die;
}
$t->info('A frontend context has been initialized for tests');
}
sfConfig::set('app_sfDynamicsPlugin_manager', 'ManagerMock');
$t->isa_ok(sfDynamics::getManager(), 'ManagerMock', '::getManager() the manager class can be customized in app.yml');
示例2: generateJsHtml
{
return '<link rel="stylesheet" type="text/css" media="screen" href="/dynamics/foo.css" />';
}
public function generateJsHtml()
{
return '<script type="text/javascript" src="/dynamics/foo.js"></script>';
}
}
$t = new lime_test(7, new lime_output_color());
if (!sfContext::hasInstance()) {
require_once $_SERVER['SYMFONY'] . '/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();
require_once dirname(__FILE__) . '/../../fixtures/project/config/ProjectConfiguration.class.php';
sfContext::createInstance(ProjectConfiguration::getApplicationConfiguration('frontend', 'test', isset($debug) ? $debug : true));
if (!sfContext::hasInstance()) {
$t->error('A context instance is required');
die;
}
$t->info('A frontend context has been initialized for tests');
}
$t->comment('->addSfDynamicsTags()');
sfConfig::set('app_sfDynamicsPlugin_manager', 'ManagerMock');
$manager = sfDynamics::getManager();
$t->info('New placeholder system');
$content = <<<END
<html>
<head>
<!-- Include sfDynamics css tags -->
<link rel="stylesheet" type="text/css" media="screen" href="/bar.css" />
</head>
<body>