mirror of
https://github.com/wallabag/wallabag.git
synced 2026-11-12 01:32:16 +01:00
Add the Gregwar bundle, configure URL-backed CAPTCHA generation, and expose its refresh route through the anonymous firewall boundary. This isolates the dependency and routing foundation so reviewers can verify package compatibility and route security before user forms consume it. Public and administrator form integration is intentionally deferred to later commits.
20 lines
608 B
PHP
20 lines
608 B
PHP
<?php
|
|
|
|
namespace Wallabag\Tests\Functional\Controller;
|
|
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
use Wallabag\Tests\Functional\WallabagTestCase;
|
|
|
|
class CaptchaControllerTest extends WallabagTestCase
|
|
{
|
|
public function testUnknownSessionKeyIsRejectedAnonymously(): void
|
|
{
|
|
$client = $this->getTestClient();
|
|
|
|
$client->request('GET', '/_captcha/generate-captcha/unknown');
|
|
|
|
$this->assertSame(Response::HTTP_PRECONDITION_REQUIRED, $client->getResponse()->getStatusCode());
|
|
$this->assertSame('image/jpeg', $client->getResponse()->headers->get('Content-Type'));
|
|
}
|
|
}
|