1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

PHPStan level 5

This commit is contained in:
Yassine Guedidi 2025-04-21 16:27:44 +02:00
parent 3ef7064ada
commit 36eb513e1b
22 changed files with 60 additions and 47 deletions

View file

@ -5,6 +5,7 @@ namespace Tests\Wallabag\Controller\Api;
use Doctrine\ORM\EntityManagerInterface;
use Tests\Wallabag\WallabagTestCase;
use Wallabag\Entity\Api\Client;
use Wallabag\Entity\User;
class DeveloperControllerTest extends WallabagTestCase
{
@ -133,7 +134,10 @@ class DeveloperControllerTest extends WallabagTestCase
$client = $this->getTestClient();
$em = $client->getContainer()->get(EntityManagerInterface::class);
$userManager = static::getContainer()->get('fos_user.user_manager');
$user = $userManager->findUserBy(['username' => $username]);
\assert($user instanceof User);
$apiClient = new Client($user);
$apiClient->setName('My app');
$apiClient->setAllowedGrantTypes($grantTypes);