本文整理汇总了PHP中lime_test::is方法的典型用法代码示例。如果您正苦于以下问题:PHP lime_test::is方法的具体用法?PHP lime_test::is怎么用?PHP lime_test::is使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lime_test
的用法示例。
在下文中一共展示了lime_test::is方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: check_test_tree
function check_test_tree(lime_test $t, ioMenuItem $menu)
{
$t->info('### Running checks on the integrity of the test tree.');
$t->is(count($menu), 2, 'count(rt) returns 2 children');
$t->is(count($menu['Parent 1']), 3, 'count(pt1) returns 3 children');
$t->is(count($menu['Parent 2']), 1, 'count(pt2) returns 1 child');
$t->is(count($menu['Parent 2']['Child 4']), 1, 'count(ch4) returns 1 child');
$t->is_deeply($menu['Parent 2']['Child 4']['Grandchild 1']->getName(), 'Grandchild 1', 'gc1 has the name "Grandchild 1"');
}
示例2: fail
/**
* Tests that this input fails
*
* @param string $input
* @param string $message
*/
public function fail($input, $message = null, $encoding = 'utf-8')
{
$this->lime->diag($input);
try {
$this->lexer->tokenize($input, $encoding);
$this->lime->fail('exception not thrown');
if ($message) {
$this->lime->skip('');
}
} catch (Exception $e) {
$this->lime->pass('exception caught: ' . $e->getMessage());
if ($message) {
$this->lime->is($e->getMessage(), $message, 'exception message matches');
}
}
}
示例3: launchTests
/**
* Test launcher
*
* @param string $schema Path to schema file
*/
function launchTests($schema)
{
$this->t->diag('->load()');
$this->load($schema);
$this->t->diag('->getTables()');
$tables = $this->tables;
$this->t->is(count($tables), 2, "->getTables() should return 2 table from fixture.");
$this->t->ok(in_array('testTable', array_keys($tables)), "->getTables() should return 'testTable' from fixture.");
$this->t->diag('->classes');
$this->t->is(count($this->classes), 2, "->classes should have 2 class from fixture");
$this->t->ok($this->getClass('TestTable'), "->classes should have 'TestTable' from fixture.");
$this->t->ok($this->getClass('TestTable')->getColumn('dummy_id')->hasRelation(), 'foreign relation is properly imported');
#$this->t->diag('->asDoctrineYml()');
#$yml = $this->asDoctrineYml();
#$this->t->cmp_ok(strlen($yml['source']), '>', 0, "->asDoctrineYml() doctrine YAML shoudl not be empty.");
$this->t->diag('->findClassByTableName()');
$this->t->is($this->findClassByTableName('testTable')->getPhpName(), 'TestTable', "->findClassByTableName() returns 'TestTable' class for 'testTable' table.");
$yml = $this->asDoctrineYml();
$yml = $yml['source'];
$this->t->like($yml, '@cascadeDelete: 1@', 'onDelete is generated');
}
示例4: launchTests
/**
* Test launcher
*
* @param string $schema Path to schema file
*/
function launchTests($schema)
{
$this->t->diag('->load()');
$this->load($schema);
$this->process();
$yml = $this->asDoctrineYml();
$this->t->diag('->getClasses()');
$classes = $this->getClasses();
$nbClasses = 12;
$this->t->is(count($classes), $nbClasses, "->getClasses() should return {$nbClasses} classes from fixture.");
$this->t->diag('->getClass()');
$class = $this->getClass('TestClass');
#$this->t->ok($class->isTable(),"->getClass() should return return class instance.");
$this->t->diag('->parentTable()');
$table = $this->parentTable($class);
$this->t->is(get_class($table), 'sfDoctrineTableSchema', "->parentTable() should return table instance.");
$this->t->is($this->getClass('ColAggregation')->getTableName(), 'parent_table', 'inheritance gets the right parent table');
#$this->t->ok($this->getClass('SeparateTable')->isTable(), '"SeparateTable" is a table-class');
$this->t->is($this->getClass('BookI18n')->getColumn('culture')->getProperty('type'), 'string', 'culture field is defined (as a string)');
$rel = $this->getClass('BookI18n')->getRelation('id');
$this->t->is($rel->get('localName'), 'BookI18n', 'i18n relation name is not a plural');
$this->t->is($this->getClass('ColAggregation')->getTable()->getColumn('class_key')->getProperty('type'), 'integer', 'inheritance field is defined (as an integer)');
$c = $this->getClass('SeparateTable');
$SeparateTablePhp = $c->asPhp();
$SeparateTableSource = $SeparateTablePhp[0]['source'];
$this->t->like($SeparateTableSource, '/extends Parent/', 'The class "SeparateTable" extends Parent without having any class key field');
$this->t->like($SeparateTableSource, '@setTableName\\(\'separate_table\'\\)@', 'class "SeparateTable" has both a table and inheritance');
$this->t->like($SeparateTableSource, '@parent::setTableDefinition\\(\\);@', 'class "SeparateTable" calls parent::setTableDefinition');
$colAggregationPhp = $this->getClass('ColAggregation')->asPhp();
$this->t->like($colAggregationPhp[0]['source'], "@setInheritanceMap\\(array\\('class_key'=>1\\)\\)@", 'setInheritanceMap is properly set');
$this->t->diag('relationships');
$yangPhp = $this->getClass('Yin')->asPhp();
$this->t->like($yangPhp[0]['source'], "#hasOne\\('Yang as Yang', 'Yin.yang_id', 'id'\\)#", 'one to one relationships is properly declared');
$userPhp = $this->getClass('User')->asPhp();
$this->t->like($userPhp[0]['source'], "#hasMany\\('Book as Books', 'Book.author_id'\\)#", 'hasMany is properly declared');
$this->t->like($userPhp[0]['source'], "#hasMany\\('Group as Groups', 'User2Group.group_id'\\)#", 'has many to many properly declared');
$userGroupPhp = $this->getClass('User2Group')->asPhp();
$this->t->like($userGroupPhp[0]['source'], "#ownsOne\\('User as User', 'User2Group.group_id', 'id'\\)#", 'has many to many with cascade properly defined');
}
示例5: tempnam
$t->skip('PEAR must be installed', 5);
return;
}
require_once __DIR__ . '/sfPearDownloaderTest.class.php';
require_once __DIR__ . '/sfPearRestTest.class.php';
require_once __DIR__ . '/sfPluginTestHelper.class.php';
// setup
$temp = tempnam('/tmp/sf_plugin_test', 'tmp');
unlink($temp);
mkdir($temp, 0777, true);
define('SF_PLUGIN_TEST_DIR', $temp);
$options = array('plugin_dir' => $temp . '/plugins', 'cache_dir' => $temp . '/cache', 'preferred_state' => 'stable', 'rest_base_class' => 'sfPearRestTest', 'downloader_base_class' => 'sfPearDownloaderTest');
$dispatcher = new sfEventDispatcher();
$environment = new sfPearEnvironment($dispatcher, $options);
$environment->registerChannel('pear.example.com', true);
$rest = $environment->getRest();
// ->getPluginVersions()
$t->diag('->getPluginVersions()');
$t->is($rest->getPluginVersions('sfTestPlugin'), array('1.1.3', '1.0.3', '1.0.0'), '->getPluginVersions() returns an array of stable versions for a plugin');
$t->is($rest->getPluginVersions('sfTestPlugin', 'stable'), array('1.1.3', '1.0.3', '1.0.0'), '->getPluginVersions() accepts stability as a second parameter and returns an array of versions for a plugin based on stability');
$t->is($rest->getPluginVersions('sfTestPlugin', 'beta'), array('1.0.4', '1.1.4', '1.1.3', '1.0.3', '1.0.0'), '->getPluginVersions() accepts stability as a second parameter and returns an array of versions for a plugin based on stability cascade (beta includes stable)');
// ->getPluginDependencies()
$t->diag('->getPluginDependencies()');
$dependencies = $rest->getPluginDependencies('sfTestPlugin', '1.1.4');
$t->is($dependencies['required']['package']['min'], '1.1.0', '->getPluginDependencies() returns an array of dependencies');
// ->getPluginDownloadURL()
$t->diag('->getPluginDownloadURL()');
$t->is($rest->getPluginDownloadURL('sfTestPlugin', '1.1.3', 'stable'), 'http://pear.example.com/get/sfTestPlugin/sfTestPlugin-1.1.3.tgz', '->getPluginDownloadURL() returns a plugin URL');
// teardown
sfToolkit::clearDirectory($temp);
rmdir($temp);
示例6: dirname
<?php
require_once dirname(__FILE__) . '/helper/dmUnitTestHelper.php';
$helper = new dmUnitTestHelper();
$helper->boot('front');
$t = new lime_test();
$pageHelper = $helper->get('page_helper');
$t->is($pageHelper->getOption('widget_css_class_pattern'), dmArray::get($helper->get('service_container')->getParameter('page_helper.options'), 'widget_css_class_pattern'), 'widget_css_class_pattern : ' . $pageHelper->getOption('widget_css_class_pattern'));
$widget = array('id' => 9999, 'module' => 'dmWidgetContent', 'action' => 'breadCrumb', 'value' => json_encode(array('text' => 'test title', 'tag' => 'h1')), 'css_class' => 'custom_class');
$pageHelper->setOption('widget_css_class_pattern', '');
$expected = array('dm_widget custom_class', 'dm_widget_inner');
$t->is($pageHelper->getWidgetContainerClasses($widget), $expected, 'widgetContainerClasses for breadCrumb : ' . implode(', ', $expected));
$widget['action'] = 'title';
$expected = array('dm_widget custom_class', 'dm_widget_inner');
$t->is($pageHelper->getWidgetContainerClasses($widget), $expected, 'widgetContainerClasses for title : ' . implode(', ', $expected));
$pageHelper->setOption('widget_css_class_pattern', '%module%_%action%');
$expected = array('dm_widget content_title custom_class', 'dm_widget_inner');
$t->is($pageHelper->getWidgetContainerClasses($widget), $expected, 'widgetContainerClasses for title : ' . implode(', ', $expected));
$pageHelper->setOption('widget_css_class_pattern', 'module_%module% action_%action%');
$expected = array('dm_widget module_content action_title custom_class', 'dm_widget_inner');
$t->is($pageHelper->getWidgetContainerClasses($widget), $expected, 'widgetContainerClasses for title : ' . implode(', ', $expected));
示例7: dirname
<?php
/*
* This file is part of the symfony package.
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
require_once dirname(__FILE__) . '/../../../bootstrap/unit.php';
$t = new lime_test(1, new lime_output_color());
$dom = new DomDocument('1.0', 'utf-8');
$dom->validateOnParse = true;
// ->configure()
$t->diag('->configure()');
$w = new sfWidgetFormI18nDateTime(array('culture' => 'fr'));
$t->is($w->getOption('format'), '%date% %time%', '->configure() automatically changes the date format for the given culture');
示例8: dirname
<?php
require_once dirname(__FILE__) . '/../../../../../test/bootstrap/unit.php';
$t = new lime_test(23);
$serviceContainer->pluginLoader->loadPlugins(array('nbVisualStudioPlugin'));
$t->comment('nbVisualStudioClientTest - Test default compiler line for LIB DEBUG project');
$client = new nbVisualStudioClient('outputFile');
$t->is($client->getCompilerCmdLine(), 'cl /c /nologo /EHsc /Gd /TP /Od /RTC1 /MDd /DUNICODE /D_UNICODE /DWIN32 /D_DEBUG', '->getCompilerCmdLine() has all default flags for LIB + DEBUG configuration');
$t->is($client->getLinkerCmdLine(), 'lib /nologo /OUT:outputFile obj/Debug/*.obj', '->getLinkerCmdLine() has all default flags for LIB + DEBUG configuration');
$t->comment('nbVisualStudioClientTest - Test default compiler line for LIB RELEASE project');
$client = new nbVisualStudioClient('outputFile', nbVisualStudioClient::LIB, nbVisualStudioClient::RELEASE);
$t->is($client->getCompilerCmdLine(), 'cl /c /nologo /EHsc /Gd /TP /O2 /Oi /GL /MD /Gy /DUNICODE /D_UNICODE /DWIN32 /DNDEBUG', '->getCompilerCmdLine() has all default flags for LIB + RELEASE configuration');
$t->is($client->getLinkerCmdLine(), 'lib /nologo /OUT:outputFile obj/Release/*.obj', '->getLinkerCmdLine() has all default flags for LIB + RELEASE configuration');
$t->comment('nbVisualStudioClientTest - Test default compiler line for APP DEBUG project');
$client = new nbVisualStudioClient('outputFile', nbVisualStudioClient::APP);
$t->is($client->getCompilerCmdLine(), 'cl /c /nologo /EHsc /Gd /TP /Od /RTC1 /MDd /DUNICODE /D_UNICODE /DWIN32 /D_DEBUG', '->getCompilerCmdLine() has all default flags for APP + DEBUG configuration');
$t->is($client->getLinkerCmdLine(), 'link /nologo /OUT:outputFile obj/Debug/*.obj', '->getLinkerCmdLine() has all default flags for APP + DEBUG configuration');
$t->comment('nbVisualStudioClientTest - Test default compiler line for APP RELEASE project');
$client = new nbVisualStudioClient('outputFile', nbVisualStudioClient::APP, nbVisualStudioClient::RELEASE);
$t->is($client->getCompilerCmdLine(), 'cl /c /nologo /EHsc /Gd /TP /O2 /Oi /GL /MD /Gy /DUNICODE /D_UNICODE /DWIN32 /DNDEBUG', '->getCompilerCmdLine() has all default flags for APP + RELEASE configuration');
$t->is($client->getLinkerCmdLine(), 'link /nologo /OUT:outputFile obj/Release/*.obj', '->getLinkerCmdLine() has all default flags for APP + RELEASE configuration');
$t->comment('nbVisualStudioClientTest - Test set additional defines to compiler');
$client = new nbVisualStudioClient('outputFile', nbVisualStudioClient::APP);
$client->setProjectDefines(array('CUSTOM'));
$t->is($client->getCompilerCmdLine(), 'cl /c /nologo /EHsc /Gd /TP /Od /RTC1 /MDd /DUNICODE /D_UNICODE /DWIN32 /D_DEBUG /DCUSTOM', '->setProjectDefines() sets one additional define to compiler command line');
$client->setProjectDefines(array('CUSTOM1', 'CUSTOM2'));
$t->is($client->getCompilerCmdLine(), 'cl /c /nologo /EHsc /Gd /TP /Od /RTC1 /MDd /DUNICODE /D_UNICODE /DWIN32 /D_DEBUG /DCUSTOM1 /DCUSTOM2', '->setProjectDefines() sets all additional defines to compiler command line');
$t->comment('nbVisualStudioClientTest - Test set additional includes to compiler');
$client = new nbVisualStudioClient('outputFile');
$client->setProjectIncludes(array('include1'));
$t->is($client->getCompilerCmdLine(), 'cl /c /nologo /EHsc /Gd /TP /Od /RTC1 /MDd /DUNICODE /D_UNICODE /DWIN32 /D_DEBUG /I"include1"', '->setProjectIncludes() sets one additional include to compiler command line');
示例9: dirname
<?php
require_once dirname(__FILE__) . '/helper/dmUnitTestHelper.php';
$helper = new dmUnitTestHelper();
$helper->boot();
$t = new lime_test(33);
$v = new dmValidatorCssIdAndClasses();
$t->diag('->clean()');
foreach (array('a', 'a_b', 'a-c', 'qieurgfbqoiuzbfvoqiuzZFZGPSOZDNZKFjflzkh986875OoihzyfvbxoquyfvxqozufyxqzUEFV', '9', '_', ' bla rebla ', '- _ 8', '.class', '.a b.c.d', '#myid.a b.c.d', '#myid class1 class2', 'class1 class2 #myid', '.a b#myid.c.d', '.a b#myid.c.d#myid', '.a b#myid.c.d #myid', '#my_id', '#my-id', ' #my-id ') as $classes) {
try {
$t->comment('"' . $classes . '" -> "' . $v->clean($classes) . '"');
$t->pass('->clean() checks that the value is a valid css class name + id');
} catch (sfValidatorError $e) {
$t->fail('->clean() checks that the value is a valid css class name + id');
}
}
foreach (array('.zegze$g.zegf', '/', 'a/f', 'a^', 'a # @', 'é', '-{') as $nonClass) {
$t->comment($nonClass);
try {
$v->clean($nonClass);
$t->fail('->clean() throws an sfValidatorError if the value is not a valid css class name + id');
$t->skip('', 1);
} catch (sfValidatorError $e) {
$t->pass('->clean() throws an sfValidatorError if the value is not a valid css class name + id');
$t->is($e->getCode(), 'invalid', '->clean() throws a sfValidatorError');
}
}
示例10: fclose
} else {
$error .= $line;
// stderr
}
}
fclose($pipe);
}
$returnCode = proc_close($process);
}
// Init lime
include_once dirname(__FILE__) . '/../lime/lime.php';
$t = new lime_test(8, new lime_output_color());
$scriptPath = realpath(dirname(__FILE__) . '/../../svn_pre_commit_hook.php');
// Test calling the script in an invalid way
execute("php {$scriptPath} repoName trxNum --toto", $output, $error, $returnCode);
$t->is($returnCode, 1, "Script fail as two arguments are required");
$t->is($error, "PRE COMMIT HOOK SYSTEM ERROR, PLEASE CONTACT SERVER ADMIN.\n (Invalid option name [\"toto\"])\n", "Valid error message is return");
// First test with a working commit
$cmd = "php {$scriptPath} repoName trxNum --test-mode --include=EmptyComment";
execute($cmd, $output, $error, $returnCode);
$t->is($returnCode, 0, "On success, return code is 0");
$t->is($output, "All pre commit checks successed", "On success a success message is return");
$t->is($error, "", "On success, no error output on stderr");
// Second test with a fail commit, due to an empty comment
$cmd = "php {$scriptPath} emptyComment trxNum --test-mode --include=EmptyComment";
execute($cmd, $output, $error, $returnCode);
$t->is($returnCode, 1, "On error, return code is 1");
$t->is($output, "", "On error, no echo on the stdout");
$errorMsg = <<<EOC
示例11: sfNamespacedParameterHolder
<?php
/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
require_once __DIR__ . '/../../bootstrap/unit.php';
$t = new lime_test(50);
// ->clear()
$t->diag('->clear()');
$ph = new sfNamespacedParameterHolder();
$ph->clear();
$t->is($ph->getAll(), null, '->clear() clears all parameters');
$ph->set('foo', 'bar');
$ph->clear();
$t->is($ph->getAll(), null, '->clear() clears all parameters');
// ->get()
$t->diag('->get()');
$ph = new sfNamespacedParameterHolder();
$ph->set('foo', 'bar');
$t->is($ph->get('foo'), 'bar', '->get() returns the parameter value for the given key');
$t->is($ph->get('bar'), null, '->get() returns null if the key does not exist');
$ph = new sfNamespacedParameterHolder();
$t->is('default_value', $ph->get('foo1', 'default_value'), '->get() takes the default value as its second argument');
$ph = new sfNamespacedParameterHolder();
$ph->set('myfoo', 'bar', 'symfony/mynamespace');
$t->is('bar', $ph->get('myfoo', null, 'symfony/mynamespace'), '->get() takes an optional namespace as its third argument');
$t->is(null, $ph->get('myfoo'), '->get() can have the same key for several namespaces');
示例12: guessFromFileBinary
return parent::guessFromMimeContentType($file);
}
public function guessFromFileBinary($file)
{
return parent::guessFromFileBinary($file);
}
public function getMimeTypesFromCategory($category)
{
return parent::getMimeTypesFromCategory($category);
}
}
// ->getMimeTypesFromCategory()
$t->diag('->getMimeTypesFromCategory()');
$v = new testValidatorFile();
try {
$t->is($v->getMimeTypesFromCategory('non_existant_category'), '');
$t->fail('->getMimeTypesFromCategory() throws an InvalidArgumentException if the category does not exist');
} catch (InvalidArgumentException $e) {
$t->pass('->getMimeTypesFromCategory() throws an InvalidArgumentException if the category does not exist');
}
$categories = $v->getOption('mime_categories');
$t->is($v->getMimeTypesFromCategory('web_images'), $categories['web_images'], '->getMimeTypesFromCategory() returns an array of mime types for a given category');
$v->setOption('mime_categories', array_merge($v->getOption('mime_categories'), array('text' => array('text/plain'))));
$t->is($v->getMimeTypesFromCategory('text'), array('text/plain'), '->getMimeTypesFromCategory() returns an array of mime types for a given category');
// ->guessFromFileinfo()
$t->diag('->guessFromFileinfo()');
if (!function_exists('finfo_open')) {
$t->skip('finfo_open is not available', 2);
} else {
$v = new testValidatorFile();
$t->is($v->guessFromFileinfo($tmpDir . '/test.txt'), 'text/plain', '->guessFromFileinfo() guesses the type of a given file');
示例13: dirname
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
require_once dirname(__FILE__) . '/../bootstrap.php';
use Bundle\sfFormBundle\Validator\SchemaFilter;
use Bundle\sfFormBundle\Validator\String;
use Bundle\sfFormBundle\Validator\Error;
use Bundle\sfFormBundle\Validator\ErrorSchema;
$t = new lime_test(6);
$v1 = new String(array('min_length' => 2, 'trim' => true));
$v = new SchemaFilter('first_name', $v1);
// ->clean()
$t->diag('->clean()');
$t->is($v->clean(array('first_name' => ' foo ')), array('first_name' => 'foo'), '->clean() executes the embedded validator');
try {
$v->clean('string');
$t->fail('->clean() throws a \\InvalidArgumentException if the input value is not an array');
} catch (\InvalidArgumentException $e) {
$t->pass('->clean() throws a \\InvalidArgumentException if the input value is not an array');
}
try {
$v->clean(null);
$t->fail('->clean() throws a Error if the embedded validator failed');
$t->skip('', 1);
} catch (Error $e) {
$t->pass('->clean() throws a Error if the embedded validator failed');
$t->is($e->getCode(), 'first_name [required]', '->clean() throws a Error');
}
try {
示例14: realpath
<?php
// initializes testing framework
$sf_root_dir = realpath(dirname(__FILE__) . '/../../../../');
// initialize database manager
require_once $sf_root_dir . '/test/bootstrap/unit.php';
// start tests
$t = new lime_test(31);
// these tests check for the tags attachement consistency
$t->diag('::cleanTagName');
$tag = TaggableToolkit::cleanTagName('');
$t->is($tag, '', 'empty string');
$tag = TaggableToolkit::cleanTagName('test');
$t->is($tag, 'test', 'single tag');
$tag = TaggableToolkit::cleanTagName('test1,test2');
$t->is($tag, 'test1 test2', 'double tag whitespace');
$tag = TaggableToolkit::cleanTagName('test1, test2');
$t->is($tag, 'test1 test2', 'double tag with whitespace');
$t->todo('test optional option parameter');
$t->diag('::explodeTagString');
$tag = TaggableToolkit::explodeTagString('');
$t->is($tag, '', 'empty string');
$tag = TaggableToolkit::explodeTagString('test1');
$t->is($tag, 'test1', 'single tag');
$tag = TaggableToolkit::explodeTagString('test1 test2');
$t->is($tag, 'test1 test2', 'single tag with whitespace');
$tag = TaggableToolkit::explodeTagString('test1,test2');
$t->is($tag, array('test1', 'test2'), 'double tag');
$tag = TaggableToolkit::explodeTagString(' test1 , test2');
$t->is($tag, array('test1', 'test2'), 'double dirty tag');
$tag = TaggableToolkit::explodeTagString(' test1 ,
示例15: dirname
<?php
/*
* This file is part of the symfony package.
*
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
require_once dirname(__FILE__) . '/../lib/lime/lime.php';
require_once dirname(__FILE__) . '/../../lib/sfTemplateAutoloader.php';
sfTemplateAutoloader::register();
$t = new lime_test(2);
$renderer = new sfTemplateRendererPhp();
// ->evaluate()
$t->diag('->evaluate()');
$template = new sfTemplateStorageString('<?php echo $foo ?>');
$t->is($renderer->evaluate($template, array('foo' => 'bar')), 'bar', '->evaluate() renders templates that are instances of sfTemplateStorageString');
$template = new sfTemplateStorageFile(dirname(__FILE__) . '/fixtures/templates/foo.php');
$t->is($renderer->evaluate($template, array('foo' => 'bar')), 'bar', '->evaluate() renders templates that are instances of sfTemplateStorageFile');