This commit is contained in:
Simon Vieille 2016-01-12 19:57:14 +01:00
parent 2e5185bb19
commit 8b59bfd582
14 changed files with 109 additions and 0 deletions

View File

@ -15,6 +15,8 @@ class AppKernel extends Kernel
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new Mmi\Bundle\ChallengeBundle\MmiChallengeBundle(),
new Mmi\Bundle\EnigmaBundle\MmiEnigmaBundle(),
];
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {

Binary file not shown.

View File

@ -2,6 +2,8 @@ imports:
- { resource: parameters.yml }
- { resource: security.yml }
- { resource: services.yml }
- { resource: "@MmiChallengeBundle/Resources/config/services.yml" }
- { resource: "@MmiEnigmaBundle/Resources/config/services.yml" }
# Put parameters here that don't need to change on each machine where the app is deployed
# http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration

View File

@ -0,0 +1,9 @@
mmi_enigma:
resource: "@MmiEnigmaBundle/Controller/"
type: annotation
prefix: /
mmi_challenge:
resource: "@MmiChallengeBundle/Controller/"
type: annotation
prefix: /

View File

@ -0,0 +1,17 @@
<?php
namespace Mmi\Bundle\ChallengeBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
class DefaultController extends Controller
{
/**
* @Route("/")
*/
public function indexAction()
{
return $this->render('MmiChallengeBundle:Default:index.html.twig');
}
}

View File

@ -0,0 +1,9 @@
<?php
namespace Mmi\Bundle\ChallengeBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class MmiChallengeBundle extends Bundle
{
}

View File

@ -0,0 +1,4 @@
services:
# mmi_challenge.example:
# class: Mmi\Bundle\ChallengeBundle\Example
# arguments: [@service_id, "plain_value", %parameter%]

View File

@ -0,0 +1 @@
Hello World!

View File

@ -0,0 +1,17 @@
<?php
namespace Mmi\Bundle\ChallengeBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class DefaultControllerTest extends WebTestCase
{
public function testIndex()
{
$client = static::createClient();
$crawler = $client->request('GET', '/');
$this->assertContains('Hello World', $client->getResponse()->getContent());
}
}

View File

@ -0,0 +1,17 @@
<?php
namespace Mmi\Bundle\EnigmaBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
class DefaultController extends Controller
{
/**
* @Route("/")
*/
public function indexAction()
{
return $this->render('MmiEnigmaBundle:Default:index.html.twig');
}
}

View File

@ -0,0 +1,9 @@
<?php
namespace Mmi\Bundle\EnigmaBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class MmiEnigmaBundle extends Bundle
{
}

View File

@ -0,0 +1,4 @@
services:
# mmi_enigma.example:
# class: Mmi\Bundle\EnigmaBundle\Example
# arguments: [@service_id, "plain_value", %parameter%]

View File

@ -0,0 +1 @@
Hello World!

View File

@ -0,0 +1,17 @@
<?php
namespace Mmi\Bundle\EnigmaBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class DefaultControllerTest extends WebTestCase
{
public function testIndex()
{
$client = static::createClient();
$crawler = $client->request('GET', '/');
$this->assertContains('Hello World', $client->getResponse()->getContent());
}
}