Snippets tagged "propel lime" Snippets tagged "propel lime"

[Symfony 1.1 beta] Créer un test unitaire et initialiser Propel

Depuis l'apparition du nouveau système de configuration de Symfony 1.1, voici un boostrap type pour vos tests unitaires nécessitant l'accès à l'environnement Propel :

<?php
require_once(dirname(__FILE__).'/../../config/ProjectConfiguration.class.php');
$configuration = ProjectConfiguration::getApplicationConfiguration('main', 'test', true);
include($configuration->getSymfonyLibDir().'/vendor/lime/lime.php');
sfContext::createInstance($configuration);

Pensez cependant à remplacer main par le nom de votre application courante (par ex. frontend).

by Nicolas Perriault on 2008-03-19, tagged lime  propel  symfony  unittest