Skip to content

Instantly share code, notes, and snippets.

View lsmith77's full-sized avatar

Lukas Kahwe Smith lsmith77

View GitHub Profile
<?php
namespace Application\FooBundle\Test;
/*
* The on-line validator: http://validator.nu/
* The documentation: http://about.validator.nu/
* Documentation about the web service: http://wiki.whatwg.org/wiki/Validator.nu_Web_Service_Interface
*/
class Html5WebTestCase extends WebTestCase
{
<?php
namespace Application\FooBundle\Test;
use Doctrine\Common\DataFixtures\Loader;
use Doctrine\Common\DataFixtures\Executor\ORMExecutor;
use Doctrine\Common\DataFixtures\Purger\ORMPurger;
class WebTestCase extends \Symfony\Bundle\FrameworkBundle\Test\WebTestCase
{
<?php
namespace Bundle\MultiFrontControllerBundle\Test;
class WebTestCase extends \Symfony\Bundle\FrameworkBundle\Test\WebTestCase
{
/**
* @see The class description
*/
public function __construct()
doctrine_user.config:
db_driver: odm
class:
model:
user: Bundle\ExerciseUserBundle\Document\User
group: ~
permission: ~
form:
user: ~
group: ~
@lsmith77
lsmith77 / gist:648702
Created October 27, 2010 09:04
multiplexer to json-ify any controller as well as call multiple separate controllers via one request
<?php
namespace Application\FooBundle\Controller;
class MultiplexController
{
/**
* Request
* @var Symfony\Component\HttpFoundation\Request
*/
<?php
// put this into "dev/less/getcss.php"
// checkout lessphp into src/vendor: git clone git://github.com/leafo/lessphp.git
// add "Alias /dev/ /home/you/src/joiz/dev/" to your vhost
// add "RewriteRule ^main.css$ dev/less/getcss.php?cssfile=main [L]" to your vhost or .htaccess
// create app/config/main.less, use imports into your bundles (Resources/data/less/*)
// browse to http://[yourdomain]/main.css
$lessCompiler = __DIR__.'/../../src/vendor/lessphp/lessc.inc.php';
if (!include $lessCompiler) {