Skip to content

Commit

Permalink
* first true commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cordoval committed Jul 2, 2011
0 parents commit 029c504
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Controller/DefaultController.php
@@ -0,0 +1,19 @@
<?php

namespace Cordova\TwigPerformanceBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

class DefaultController extends Controller
{
/**
* @Route("/hello/{name}")
* @Template()
*/
public function indexAction($name)
{
return array('name' => $name);
}
}
9 changes: 9 additions & 0 deletions CordovaTwigPerformanceBundle.php
@@ -0,0 +1,9 @@
<?php

namespace Cordova\TwigPerformanceBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class CordovaTwigPerformanceBundle extends Bundle
{
}
Empty file added Resources/doc/index.rst
Empty file.
11 changes: 11 additions & 0 deletions Resources/translations/messages.fr.xliff
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="file.ext">
<body>
<trans-unit id="1">
<source>Symfony2 is great</source>
<target>J'aime Symfony2</target>
</trans-unit>
</body>
</file>
</xliff>
1 change: 1 addition & 0 deletions Resources/views/Default/index.html.twig
@@ -0,0 +1 @@
Hello {{ name }}!
17 changes: 17 additions & 0 deletions Tests/Controller/DefaultControllerTest.php
@@ -0,0 +1,17 @@
<?php

namespace Cordova\TwigPerformanceBundle\Tests\Controller;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class DefaultControllerTest extends WebTestCase
{
public function testIndex()
{
$client = $this->createClient();

$crawler = $client->request('GET', '/hello/Fabien');

$this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0);
}
}

0 comments on commit 029c504

Please sign in to comment.