Implemented template dummys

This commit is contained in:
Kevin Frantz 2018-09-06 08:46:49 +02:00
parent e303221507
commit 99371d9521
3 changed files with 23 additions and 10 deletions

View File

@ -13,8 +13,6 @@ use Symfony\Component\HttpFoundation\Response;
class DefaultController extends AbstractController implements DefaultControllerInterface class DefaultController extends AbstractController implements DefaultControllerInterface
{ {
/** /**
* Matches /
*
* @Route("/imprint", name="imprint") * @Route("/imprint", name="imprint")
*/ */
public function imprint(): Response public function imprint(): Response
@ -23,8 +21,6 @@ class DefaultController extends AbstractController implements DefaultControllerI
} }
/** /**
* Matches /
*
* @Route("/", name="homepage") * @Route("/", name="homepage")
*/ */
public function homepage(): Response public function homepage(): Response

View File

@ -2,21 +2,38 @@
namespace App\Controller; namespace App\Controller;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
/** /**
* *
* @author kevinfrantz * @author kevinfrantz
* *
*/ */
class UserController implements UserControllerInterface class UserController extends AbstractController implements UserControllerInterface
{ {
/**
* @Route("/user/logout", name="user_logout")
*/
public function logout(): Response public function logout(): Response
{} {
return $this->render("user/login.html.twig",['menu_items'=>[]]);
}
/**
* @Route("/user/login", name="user_login")
*/
public function login(): Response public function login(): Response
{} {
return $this->render("user/login.html.twig",['menu_items'=>[]]);
}
/**
* @Route("/user/register", name="user_register")
*/
public function register(): Response public function register(): Response
{} {
return $this->render("user/register.html.twig",['menu_items'=>[]]);
}
} }

View File

@ -1,16 +1,16 @@
<?php <?php
namespace App\Tests\Unit\Controller; namespace App\Tests\Unit\Controller;
use PHPUnit\Framework\TestCase;
use App\Controller\UserController; use App\Controller\UserController;
use App\Controller\UserControllerInterface; use App\Controller\UserControllerInterface;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
/** /**
* *
* @author kevinfrantz * @author kevinfrantz
* *
*/ */
class UserControllerTest extends TestCase class UserControllerTest extends WebTestCase
{ {
/** /**
* *