aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/WallabagBundle
diff options
context:
space:
mode:
Diffstat (limited to 'src/WallabagBundle')
-rw-r--r--src/WallabagBundle/Controller/DefaultController.php17
-rw-r--r--src/WallabagBundle/Tests/Controller/DefaultControllerTest.php18
-rw-r--r--src/WallabagBundle/WallabagBundle.php9
3 files changed, 44 insertions, 0 deletions
diff --git a/src/WallabagBundle/Controller/DefaultController.php b/src/WallabagBundle/Controller/DefaultController.php
new file mode 100644
index 00000000..1030b7a6
--- /dev/null
+++ b/src/WallabagBundle/Controller/DefaultController.php
@@ -0,0 +1,17 @@
1<?php
2
3namespace WallabagBundle\Controller;
4
5use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
6use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7
8class DefaultController extends Controller
9{
10 /**
11 * @Route("/app/index", name="homepage")
12 */
13 public function indexAction()
14 {
15 return $this->render('default/index.html.twig');
16 }
17}
diff --git a/src/WallabagBundle/Tests/Controller/DefaultControllerTest.php b/src/WallabagBundle/Tests/Controller/DefaultControllerTest.php
new file mode 100644
index 00000000..e9022438
--- /dev/null
+++ b/src/WallabagBundle/Tests/Controller/DefaultControllerTest.php
@@ -0,0 +1,18 @@
1<?php
2
3namespace WallabagBundle\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/index');
14
15 $this->assertEquals(200, $client->getResponse()->getStatusCode());
16 $this->assertTrue($crawler->filter('html:contains("Homepage")')->count() > 0);
17 }
18}
diff --git a/src/WallabagBundle/WallabagBundle.php b/src/WallabagBundle/WallabagBundle.php
new file mode 100644
index 00000000..ddfb13f9
--- /dev/null
+++ b/src/WallabagBundle/WallabagBundle.php
@@ -0,0 +1,9 @@
1<?php
2
3namespace WallabagBundle;
4
5use Symfony\Component\HttpKernel\Bundle\Bundle;
6
7class WallabagBundle extends Bundle
8{
9}