Fixed various issues inside the tests

This commit is contained in:
Jan Böhmer 2023-05-28 02:16:40 +02:00
parent 7c03630e24
commit 79ab1a2277
4 changed files with 6 additions and 7 deletions

View file

@ -26,7 +26,7 @@ use App\Entity\UserSystem\User;
use App\Entity\UserSystem\WebauthnKey; use App\Entity\UserSystem\WebauthnKey;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Ramsey\Uuid\Uuid; use Symfony\Component\Uid\Uuid;
use Webauthn\TrustPath\EmptyTrustPath; use Webauthn\TrustPath\EmptyTrustPath;
class UserTest extends TestCase class UserTest extends TestCase
@ -133,7 +133,7 @@ class UserTest extends TestCase
[], [],
"Test", "Test",
new EmptyTrustPath(), new EmptyTrustPath(),
Uuid::fromDateTime(new \DateTime()), Uuid::v4(),
"", "",
"", "",
0 0

View file

@ -27,7 +27,7 @@ use App\Entity\UserSystem\User;
use App\Entity\UserSystem\WebauthnKey; use App\Entity\UserSystem\WebauthnKey;
use App\EventSubscriber\UserSystem\PasswordChangeNeededSubscriber; use App\EventSubscriber\UserSystem\PasswordChangeNeededSubscriber;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Ramsey\Uuid\Uuid; use Symfony\Component\Uid\Uuid;
use Webauthn\TrustPath\EmptyTrustPath; use Webauthn\TrustPath\EmptyTrustPath;
class PasswordChangeNeededSubscriberTest extends TestCase class PasswordChangeNeededSubscriberTest extends TestCase
@ -61,7 +61,7 @@ class PasswordChangeNeededSubscriberTest extends TestCase
[], [],
"Test", "Test",
new EmptyTrustPath(), new EmptyTrustPath(),
Uuid::fromDateTime(new \DateTime()), Uuid::v4(),
"", "",
"", "",
0 0

View file

@ -22,7 +22,7 @@ namespace App\Tests\Security;
use App\Entity\UserSystem\User; use App\Entity\UserSystem\User;
use App\Security\EnsureSAMLUserForSAMLLoginChecker; use App\Security\EnsureSAMLUserForSAMLLoginChecker;
use Hslavich\OneloginSamlBundle\Security\Http\Authenticator\Token\SamlToken; use Nbgrp\OneloginSamlBundle\Security\Http\Authenticator\Token\SamlToken;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Security\Core\Event\AuthenticationSuccessEvent; use Symfony\Component\Security\Core\Event\AuthenticationSuccessEvent;

View file

@ -44,8 +44,7 @@ class ElementTypeNameGeneratorTest extends WebTestCase
parent::setUp(); parent::setUp();
//Get an service instance. //Get an service instance.
self::bootKernel(); $this->service = self::getContainer()->get(ElementTypeNameGenerator::class);
$this->service = self::$container->get(ElementTypeNameGenerator::class);
} }
public function testGetLocalizedTypeNameCombination(): void public function testGetLocalizedTypeNameCombination(): void