Skip to content

Commit 68b53b1

Browse files
Merge branch '6.0' into 6.1
* 6.0: [HttpKernel] Fix test sensitivity on xdebug.file_link_format [HttpKernel] Fix non-scalar check in surrogate fragment renderer [Debug][ErrorHandler] fix operator precedence [Cache] Ensured that redis adapter can use multiple redis sentinel hosts [DoctrineBridge] fix tests [Security] Allow redirect after login to absolute URLs
2 parents d923f5b + 203153a commit 68b53b1

File tree

3 files changed

+7
-26
lines changed

3 files changed

+7
-26
lines changed

Tests/IdGenerator/EntityManager.php

Lines changed: 0 additions & 21 deletions
This file was deleted.

Tests/IdGenerator/UlidGeneratorTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Bridge\Doctrine\Tests\IdGenerator;
1313

14+
use Doctrine\ORM\EntityManager;
1415
use Doctrine\ORM\Mapping\Entity;
1516
use PHPUnit\Framework\TestCase;
1617
use Symfony\Bridge\Doctrine\IdGenerator\UlidGenerator;
@@ -21,7 +22,7 @@ class UlidGeneratorTest extends TestCase
2122
{
2223
public function testUlidCanBeGenerated()
2324
{
24-
$em = new EntityManager();
25+
$em = (new \ReflectionClass(EntityManager::class))->newInstanceWithoutConstructor();
2526
$generator = new UlidGenerator();
2627
$ulid = $generator->generate($em, new Entity());
2728

@@ -32,7 +33,7 @@ public function testUlidCanBeGenerated()
3233
public function testUlidFactory()
3334
{
3435
$ulid = new Ulid('00000000000000000000000000');
35-
$em = new EntityManager();
36+
$em = (new \ReflectionClass(EntityManager::class))->newInstanceWithoutConstructor();
3637
$factory = $this->createMock(UlidFactory::class);
3738
$factory->expects($this->any())
3839
->method('create')

Tests/IdGenerator/UuidGeneratorTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Bridge\Doctrine\Tests\IdGenerator;
1313

14+
use Doctrine\ORM\EntityManager;
1415
use PHPUnit\Framework\TestCase;
1516
use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
1617
use Symfony\Component\Uid\Factory\UuidFactory;
@@ -22,7 +23,7 @@ class UuidGeneratorTest extends TestCase
2223
{
2324
public function testUuidCanBeGenerated()
2425
{
25-
$em = new EntityManager();
26+
$em = (new \ReflectionClass(EntityManager::class))->newInstanceWithoutConstructor();
2627
$generator = new UuidGenerator();
2728
$uuid = $generator->generate($em, new Entity());
2829

@@ -32,7 +33,7 @@ public function testUuidCanBeGenerated()
3233
public function testCustomUuidfactory()
3334
{
3435
$uuid = new UuidV4();
35-
$em = new EntityManager();
36+
$em = (new \ReflectionClass(EntityManager::class))->newInstanceWithoutConstructor();
3637
$factory = $this->createMock(UuidFactory::class);
3738
$factory->expects($this->any())
3839
->method('create')
@@ -44,7 +45,7 @@ public function testCustomUuidfactory()
4445

4546
public function testUuidfactory()
4647
{
47-
$em = new EntityManager();
48+
$em = (new \ReflectionClass(EntityManager::class))->newInstanceWithoutConstructor();
4849
$generator = new UuidGenerator();
4950
$this->assertInstanceOf(UuidV6::class, $generator->generate($em, new Entity()));
5051

0 commit comments

Comments
 (0)