mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 21:57:16 +02:00
Optimized Controller Draft
This commit is contained in:
@@ -5,7 +5,10 @@ namespace Tests\Integration\Controller;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
class UrlIntegrationTest extends KernelTestCase
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
class RoutesGetStatusIntegrationTest extends KernelTestCase
|
||||
{
|
||||
const GET_URLS_STATUS = [
|
||||
'login' => 200,
|
||||
@@ -13,6 +16,7 @@ class UrlIntegrationTest extends KernelTestCase
|
||||
'register' => 301,
|
||||
'logout' => 302,
|
||||
'profile/edit' => 302,
|
||||
'spa' => 200,
|
||||
];
|
||||
|
||||
public function setUp(): void
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Integration\Controller\API;
|
||||
namespace Tests\Integration\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
use App\DBAL\Types\LanguageType;
|
||||
@@ -13,14 +13,14 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
*
|
||||
* @todo Implement more tests for success etc.
|
||||
*/
|
||||
class ApiUrlReachableIntegrationTest extends KernelTestCase
|
||||
class RoutesReachableIntegrationTest extends KernelTestCase
|
||||
{
|
||||
public function setUp(): void
|
||||
{
|
||||
self::bootKernel();
|
||||
}
|
||||
|
||||
public function testAllAPIRoutePossibilities()
|
||||
public function testAllRoutePossibilities()
|
||||
{
|
||||
foreach (LayerType::getChoices() as $layer => $layerDescription) {
|
||||
$this->controller($layer);
|
||||
@@ -52,8 +52,9 @@ class ApiUrlReachableIntegrationTest extends KernelTestCase
|
||||
private function language(string $entity, string $method): void
|
||||
{
|
||||
//$this->type('api/'.$entity, $method);
|
||||
foreach (LanguageType::getChoices() as $language => $value) {
|
||||
foreach (LanguageType::getChoices() as $language) {
|
||||
$this->type("$language/api/$entity", $method);
|
||||
$this->type("$language/html/$entity", $method);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user