Skip to content

Instantly share code, notes, and snippets.

class BarfooArticleForm extends BaseBarfooArticleForm
{
public function configure()
{
$file_src = sfContext::getInstance()->getController()->genUrl(array(
'sf_route' => 'sf_image_barfooarticle_top',
'format' => 'backend_edit',
'slug' => $this->getObject()->slug,
'id' => $this->getObject()->id
), false);
<project name="sfImageTransformExtraPlugin" default="build" basedir=".">
<!-- checking out dependencies in parallel to sfImageTransformExtraPlugins sources -->
<target name="update">
<exec executable="svn">
<arg line="checkout http://svn.symfony-project.org/branches/1.4/lib ../symfony"/>
</exec>
<exec executable="svn">
<arg line="checkout http://svn.symfony-project.org/plugins/sfImageTransformPlugin/trunk ../sfImageTransformPlugin"/>
</exec>
</target>
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="true"
bootstrap="test/bootstrap/unit.php"
colors="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="true"
/**
* There are a bunch of auto-generated TestCases.
*
* * All test methods are empty except for a $this->markTestIncomplete(..).
* * Some TestCases have no test methods yet.
*
* On execution of phpunit I get the following:
*/
$ phpunit
protected function setUp()
{
$configuration = ProjectConfiguration::getActive();
$databaseManager = new sfDatabaseManager($configuration);
$dbh = new Doctrine_Adapter_Mock('sqlite');
$this->conn = Doctrine_Manager::getInstance()->openConnection($dbh, 'doctrine', true);
Doctrine_Manager::getInstance()->createDatabases('doctrine');
Doctrine_Core::createTablesFromArray(array('TestRecord'));
}
protected function setUp()
{
$configuration = ProjectConfiguration::getActive();
$databaseManager = new sfDatabaseManager($configuration);
$dbh = new Doctrine_Adapter_Mock('sqlite');
$this->conn = Doctrine_Manager::getInstance()->openConnection($dbh, 'doctrine', true);
Doctrine_Manager::getInstance()->createDatabases('doctrine');
Doctrine_Core::createTablesFromArray(array('TestRecord'));
}
configuration = ProjectConfiguration::getActive();
$databaseManager = new sfDatabaseManager($configuration);
Doctrine_Manager::getInstance()->createDatabases('doctrine');
Doctrine_Core::createTablesFromArray(array('TestRecord'));
$configuration = ProjectConfiguration::getActive();
$databaseManager = new sfDatabaseManager($configuration);
$dbh = new Doctrine_Adapter_Mock('sqlite');
$conn = Doctrine_Manager::getInstance()->openConnection($dbh, 'doctrine', true);
Doctrine_Manager::getInstance()->createDatabases('doctrine');
Doctrine_Core::createTablesFromArray(array('TestRecord'));
Petition:
columns:
name: { type: string(24), minlength: 3 }
<?php
class petitionComponents extends sfComponents
{
public function executeForm(sfWebRequest $request)
{
$this->form = new PetitionForm();
$this->redirect_to = $request->getGetParameter('redirect_to', str_replace($request->getUriPrefix(), '', $request->getUri()));