Files
wallabag-mirror/tests/functional/Controller/SettingsControllerTest.php
2026-04-22 11:26:13 +02:00

33 lines
861 B
PHP

<?php
namespace Wallabag\Tests\Functional\Controller;
use Wallabag\Tests\Functional\WallabagTestCase;
/**
* The controller `SettingsController` does not exist.
* This test cover security against the internal settings page managed by CraueConfigBundle.
*/
class SettingsControllerTest extends WallabagTestCase
{
public function testSettingsWithAdmin(): void
{
$this->logInAs('admin');
$client = $this->getTestClient();
$crawler = $client->request('GET', '/settings');
$this->assertSame(200, $client->getResponse()->getStatusCode());
}
public function testSettingsWithNormalUser(): void
{
$this->logInAs('bob');
$client = $this->getTestClient();
$crawler = $client->request('GET', '/settings');
$this->assertSame(404, $client->getResponse()->getStatusCode());
}
}