Add homepage, tarifs, legal pages, navbar, footer and full test coverage
- Homepage: hero, how it works (buyer/organizer), features, CTA
- Tarifs: 3 plans (Gratuit, Basique 10€, Sur-mesure), JSON-LD Product
- Legal pages: mentions legales, CGU (tabs buyer/organizer), CGV, RGPD, cookies, hosting
- Navbar: neubrutalism style, logo liip, mobile menu, SEO attributes
- Footer: contact, description, legal links, tarifs
- Sitemap: add /tarifs and /sitemap-orgas-{page}.xml
- Liip Imagine: remove S3, webp format on all filters
- Tests: full coverage for all controllers, services, repositories
- Fix CSP: replace inline onclick with data-tab JS
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
40
tests/Repository/MessengerLogRepositoryTest.php
Normal file
40
tests/Repository/MessengerLogRepositoryTest.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Tests\Repository;
|
||||
|
||||
use App\Entity\MessengerLog;
|
||||
use App\Repository\MessengerLogRepository;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
|
||||
class MessengerLogRepositoryTest extends KernelTestCase
|
||||
{
|
||||
public function testRepositoryIsRegistered(): void
|
||||
{
|
||||
self::bootKernel();
|
||||
$repository = static::getContainer()->get(MessengerLogRepository::class);
|
||||
|
||||
self::assertInstanceOf(MessengerLogRepository::class, $repository);
|
||||
}
|
||||
|
||||
public function testPersistAndFind(): void
|
||||
{
|
||||
self::bootKernel();
|
||||
$em = static::getContainer()->get('doctrine.orm.entity_manager');
|
||||
|
||||
$log = new MessengerLog(
|
||||
messageClass: 'App\Message\TestMessage',
|
||||
messageBody: 'serialized',
|
||||
errorMessage: 'Test error',
|
||||
stackTrace: 'trace',
|
||||
transportName: 'async',
|
||||
retryCount: 1,
|
||||
);
|
||||
|
||||
$em->persist($log);
|
||||
$em->flush();
|
||||
|
||||
$found = $em->getRepository(MessengerLog::class)->find($log->getId());
|
||||
self::assertNotNull($found);
|
||||
self::assertSame('App\Message\TestMessage', $found->getMessageClass());
|
||||
}
|
||||
}
|
||||
52
tests/Repository/UserRepositoryTest.php
Normal file
52
tests/Repository/UserRepositoryTest.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace App\Tests\Repository;
|
||||
|
||||
use App\Entity\User;
|
||||
use App\Repository\UserRepository;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
|
||||
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
|
||||
|
||||
class UserRepositoryTest extends KernelTestCase
|
||||
{
|
||||
private UserRepository $repository;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
self::bootKernel();
|
||||
$this->repository = static::getContainer()->get(UserRepository::class);
|
||||
}
|
||||
|
||||
public function testUpgradePasswordUpdatesUser(): void
|
||||
{
|
||||
$em = static::getContainer()->get('doctrine.orm.entity_manager');
|
||||
|
||||
$user = new User();
|
||||
$user->setEmail('test-upgrade-'.uniqid().'@example.com');
|
||||
$user->setFirstName('Test');
|
||||
$user->setLastName('User');
|
||||
$user->setPassword('old-hash');
|
||||
$em->persist($user);
|
||||
$em->flush();
|
||||
|
||||
$this->repository->upgradePassword($user, 'new-hash');
|
||||
|
||||
$em->refresh($user);
|
||||
self::assertSame('new-hash', $user->getPassword());
|
||||
}
|
||||
|
||||
public function testUpgradePasswordThrowsForUnsupportedUser(): void
|
||||
{
|
||||
$this->expectException(UnsupportedUserException::class);
|
||||
|
||||
$fakeUser = new class () implements PasswordAuthenticatedUserInterface {
|
||||
public function getPassword(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
$this->repository->upgradePassword($fakeUser, 'hash');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user