diff --git a/app/AppKernel.php b/app/AppKernel.php index cecead7..78e546d 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -17,6 +17,7 @@ class AppKernel extends Kernel new Symfony\Bundle\AsseticBundle\AsseticBundle(), new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(), + new OpenScrum\InfoBundle\OpenScrumInfoBundle(), ); if (in_array($this->getEnvironment(), array('dev', 'test'))) { diff --git a/app/config/routing.yml b/app/config/routing.yml index 8b4740a..674dbdc 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -1,3 +1,7 @@ +OpenScrumInfoBundle: + resource: "@OpenScrumInfoBundle/Resources/config/routing.yml" + prefix: / + # Internal routing configuration to handle ESI #_internal: # resource: "@FrameworkBundle/Resources/config/routing/internal.xml" diff --git a/src/OpenScrum/InfoBundle/Controller/DefaultController.php b/src/OpenScrum/InfoBundle/Controller/DefaultController.php new file mode 100644 index 0000000..ef60b01 --- /dev/null +++ b/src/OpenScrum/InfoBundle/Controller/DefaultController.php @@ -0,0 +1,15 @@ +render('OpenScrumInfoBundle:Default:index.html.twig', array('name' => $name)); + } +} diff --git a/src/OpenScrum/InfoBundle/DependencyInjection/Configuration.php b/src/OpenScrum/InfoBundle/DependencyInjection/Configuration.php new file mode 100644 index 0000000..38d8f5c --- /dev/null +++ b/src/OpenScrum/InfoBundle/DependencyInjection/Configuration.php @@ -0,0 +1,29 @@ +root('open_scrum_info'); + + // Here you should define the parameters that are allowed to + // configure your bundle. See the documentation linked above for + // more information on that topic. + + return $treeBuilder; + } +} diff --git a/src/OpenScrum/InfoBundle/DependencyInjection/OpenScrumInfoExtension.php b/src/OpenScrum/InfoBundle/DependencyInjection/OpenScrumInfoExtension.php new file mode 100644 index 0000000..7bdc0b2 --- /dev/null +++ b/src/OpenScrum/InfoBundle/DependencyInjection/OpenScrumInfoExtension.php @@ -0,0 +1,28 @@ +processConfiguration($configuration, $configs); + + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader->load('services.yml'); + } +} diff --git a/src/OpenScrum/InfoBundle/OpenScrumInfoBundle.php b/src/OpenScrum/InfoBundle/OpenScrumInfoBundle.php new file mode 100644 index 0000000..b6dc719 --- /dev/null +++ b/src/OpenScrum/InfoBundle/OpenScrumInfoBundle.php @@ -0,0 +1,9 @@ +request('GET', '/hello/Fabien'); + + $this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0); + } +}