aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/AppBundle
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-22 08:30:07 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-22 08:30:07 +0100
commit93fd4692f6eb753cae16358131c8049d84cfbb41 (patch)
tree1ef2f66eb378cf419d1aa033a2c772539e60537d /src/AppBundle
parent0440249631164a378981d014bf71b617c082bf5a (diff)
downloadwallabag-93fd4692f6eb753cae16358131c8049d84cfbb41.tar.gz
wallabag-93fd4692f6eb753cae16358131c8049d84cfbb41.tar.zst
wallabag-93fd4692f6eb753cae16358131c8049d84cfbb41.zip
symfony is there
Diffstat (limited to 'src/AppBundle')
-rw-r--r--src/AppBundle/AppBundle.php9
-rw-r--r--src/AppBundle/Controller/DefaultController.php17
-rw-r--r--src/AppBundle/Tests/Controller/DefaultControllerTest.php18
3 files changed, 44 insertions, 0 deletions
diff --git a/src/AppBundle/AppBundle.php b/src/AppBundle/AppBundle.php
new file mode 100644
index 00000000..05123b67
--- /dev/null
+++ b/src/AppBundle/AppBundle.php
@@ -0,0 +1,9 @@
1<?php
2
3namespace AppBundle;
4
5use Symfony\Component\HttpKernel\Bundle\Bundle;
6
7class AppBundle extends Bundle
8{
9}
diff --git a/src/AppBundle/Controller/DefaultController.php b/src/AppBundle/Controller/DefaultController.php
new file mode 100644
index 00000000..541a7688
--- /dev/null
+++ b/src/AppBundle/Controller/DefaultController.php
@@ -0,0 +1,17 @@
1<?php
2
3namespace AppBundle\Controller;
4
5use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
6use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7
8class DefaultController extends Controller
9{
10 /**
11 * @Route("/app/example", name="homepage")
12 */
13 public function indexAction()
14 {
15 return $this->render('default/index.html.twig');
16 }
17}
diff --git a/src/AppBundle/Tests/Controller/DefaultControllerTest.php b/src/AppBundle/Tests/Controller/DefaultControllerTest.php
new file mode 100644
index 00000000..f35af752
--- /dev/null
+++ b/src/AppBundle/Tests/Controller/DefaultControllerTest.php
@@ -0,0 +1,18 @@
1<?php
2
3namespace AppBundle\Tests\Controller;
4
5use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
6
7class DefaultControllerTest extends WebTestCase
8{
9 public function testIndex()
10 {
11 $client = static::createClient();
12
13 $crawler = $client->request('GET', '/app/example');
14
15 $this->assertEquals(200, $client->getResponse()->getStatusCode());
16 $this->assertTrue($crawler->filter('html:contains("Homepage")')->count() > 0);
17 }
18}