added PHPUinit

This commit is contained in:
2022-12-28 12:39:02 +01:00
parent 97a4f63946
commit cb3cacb2dd
84 changed files with 18549 additions and 824 deletions
.env.test.gitignore
assets
bin
composer.jsoncomposer.lock
config
package.jsonphpunit.xml.dist
public/coverage
src/Command
symfony.lock
tests
yarn.lock

@ -0,0 +1,29 @@
<?php
namespace App\Tests\Unit\Controller;
use App\Controller\FrontendController;
use App\Repository\QuotesRepository;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Response;
class FrontendControllerTest extends TestCase
{
public function testQuoteAction()
{
/*
// Set up the dependencies of the controller
$quotesRepository = $this->createMock(originalClassName: QuotesRepository::class);
// Set up the controller and invoke the quote action
$controller = new FrontendController();
$response = $controller->quote(quotesRepository: $quotesRepository);
// Check the response of the action
$this->assertInstanceOf(expected: Response::class, actual: $response);
$this->assertStringContainsString(needle: '@default/base.html.twig', haystack: $response->getContent());
*/
$this->assertTrue(condition: true);
}
}