Skip to content

Commit

Permalink
feat(o10r-symfony-template-154): Upgrade doctrine/orm to 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiidonii committed Jun 4, 2024
1 parent 03535bd commit f598d0c
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions tests/Functional/Container/DIExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Doctrine\DBAL\Driver;
use Macpaw\DoctrineAwsIamRdsAuthBundle\Aws\Token\RdsTokenProvider;
use Macpaw\DoctrineAwsIamRdsAuthBundle\Aws\Token\RdsTokenProviderCacheDecorator;
use Macpaw\DoctrineAwsIamRdsAuthBundle\Aws\Token\TokenProviderInterface;
use Macpaw\DoctrineAwsIamRdsAuthBundle\Cache\CacheStorageInterface;
use Macpaw\DoctrineAwsIamRdsAuthBundle\Doctrine\Driver\IamDecorator;
use Macpaw\DoctrineAwsIamRdsAuthBundle\Doctrine\Driver\IamDecoratorDoctrine30;
Expand Down Expand Up @@ -71,14 +72,25 @@ public function testIamDecorator(): void
public function testIamMiddleware(): void
{
$middleware = self::getContainer()->get(IamMiddleware::class);
$instance = $middleware->wrap(
$this->createMock(Driver::class),
);

$driver = $this->createMock(Driver::class);
$instance = $middleware->wrap($driver);

$this->assertInstanceOf(
!$this->isDoctrine30() ? IamDecorator::class : IamDecoratorDoctrine30::class,
$instance,
);

$middleware = new IamMiddleware(
$this->createMock(TokenProviderInterface::class),
'us-west-1',
false,
);

$this->assertEquals(
$driver,
$middleware->wrap($driver),
);
}

private function isDoctrine30(): bool
Expand Down

0 comments on commit f598d0c

Please sign in to comment.