Bundles
This commit is contained in:
parent
2e5185bb19
commit
8b59bfd582
|
@ -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.
|
@ -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
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
mmi_enigma:
|
||||
resource: "@MmiEnigmaBundle/Controller/"
|
||||
type: annotation
|
||||
prefix: /
|
||||
|
||||
mmi_challenge:
|
||||
resource: "@MmiChallengeBundle/Controller/"
|
||||
type: annotation
|
||||
prefix: /
|
|
@ -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');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace Mmi\Bundle\ChallengeBundle;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class MmiChallengeBundle extends Bundle
|
||||
{
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
services:
|
||||
# mmi_challenge.example:
|
||||
# class: Mmi\Bundle\ChallengeBundle\Example
|
||||
# arguments: [@service_id, "plain_value", %parameter%]
|
|
@ -0,0 +1 @@
|
|||
Hello World!
|
|
@ -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());
|
||||
}
|
||||
}
|
|
@ -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');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace Mmi\Bundle\EnigmaBundle;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class MmiEnigmaBundle extends Bundle
|
||||
{
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
services:
|
||||
# mmi_enigma.example:
|
||||
# class: Mmi\Bundle\EnigmaBundle\Example
|
||||
# arguments: [@service_id, "plain_value", %parameter%]
|
|
@ -0,0 +1 @@
|
|||
Hello World!
|
|
@ -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());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue