Skip to content

Commit

Permalink
Add missing AppBundle directory
Browse files Browse the repository at this point in the history
  • Loading branch information
adenova committed Apr 1, 2015
1 parent 2a8eb5a commit de655da
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/AppBundle/AppBundle.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

namespace AppBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class AppBundle extends Bundle
{
}
17 changes: 17 additions & 0 deletions src/AppBundle/Controller/DefaultController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace AppBundle\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class DefaultController extends Controller
{
/**
* @Route("/app/example", name="homepage")
*/
public function indexAction()
{
return $this->render('default/index.html.twig');
}
}
18 changes: 18 additions & 0 deletions src/AppBundle/Tests/Controller/DefaultControllerTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace AppBundle\Tests\Controller;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class DefaultControllerTest extends WebTestCase
{
public function testIndex()
{
$client = static::createClient();

$crawler = $client->request('GET', '/app/example');

$this->assertEquals(200, $client->getResponse()->getStatusCode());
$this->assertTrue($crawler->filter('html:contains("Homepage")')->count() > 0);
}
}

0 comments on commit de655da

Please sign in to comment.