Skip to content

Commit ea8789b

Browse files
committed
Remove legacy test case that psalm *really* does not like
1 parent 5a5be76 commit ea8789b

File tree

1 file changed

+0
-51
lines changed

1 file changed

+0
-51
lines changed

Tests/DataCollector/DoctrineDataCollectorTest.php

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Doctrine\Bundle\DoctrineBundle\Tests\DataCollector;
44

55
use Doctrine\Bundle\DoctrineBundle\DataCollector\DoctrineDataCollector;
6-
use Doctrine\DBAL\Logging\DebugStack;
76
use Doctrine\ORM\Configuration;
87
use Doctrine\ORM\EntityManager;
98
use Doctrine\ORM\EntityManagerInterface;
@@ -17,7 +16,6 @@
1716
use Symfony\Component\HttpFoundation\Response;
1817

1918
use function interface_exists;
20-
use function method_exists;
2119

2220
class DoctrineDataCollectorTest extends TestCase
2321
{
@@ -130,55 +128,6 @@ public function testGetGroupedQueries(): void
130128
$this->assertSame(1, $groupedQueries['default'][1]['count']);
131129
}
132130

133-
/** @group legacy */
134-
public function testGetGroupedQueriesWithDeprecatedDebugStackLogger(): void
135-
{
136-
if (! method_exists(DoctrineDataCollector::class, 'addLogger')) {
137-
$this->markTestSkipped('This test requires symfony < 7.0');
138-
}
139-
140-
/** @psalm-suppress UndefinedClass Symfony < 7 specific */
141-
$logger = $this->getMockBuilder(DebugStack::class)->getMock();
142-
/** @psalm-suppress NoInterfaceProperties */
143-
$logger->queries = [];
144-
/**
145-
* @psalm-suppress NoInterfaceProperties
146-
* @psalm-suppress UndefinedDocblockClass
147-
*/
148-
$logger->queries[] = [
149-
'sql' => 'SELECT * FROM foo WHERE bar = :bar',
150-
'params' => [':bar' => 1],
151-
'types' => null,
152-
'executionMS' => 32,
153-
];
154-
/** @psalm-suppress NoInterfaceProperties */
155-
$logger->queries[] = [
156-
'sql' => 'SELECT * FROM foo WHERE bar = :bar',
157-
'params' => [':bar' => 2],
158-
'types' => null,
159-
'executionMS' => 25,
160-
];
161-
$collector = $this->createCollector([]);
162-
$collector->addLogger('default', $logger);
163-
$collector->collect(new Request(), new Response());
164-
$groupedQueries = $collector->getGroupedQueries();
165-
$this->assertCount(1, $groupedQueries['default']);
166-
$this->assertSame('SELECT * FROM foo WHERE bar = :bar', $groupedQueries['default'][0]['sql']);
167-
$this->assertSame(2, $groupedQueries['default'][0]['count']);
168-
/** @psalm-suppress NoInterfaceProperties */
169-
$logger->queries[] = [
170-
'sql' => 'SELECT * FROM bar',
171-
'params' => [],
172-
'types' => null,
173-
'executionMS' => 25,
174-
];
175-
$collector->collect(new Request(), new Response());
176-
$groupedQueries = $collector->getGroupedQueries();
177-
$this->assertCount(2, $groupedQueries['default']);
178-
$this->assertSame('SELECT * FROM bar', $groupedQueries['default'][1]['sql']);
179-
$this->assertSame(1, $groupedQueries['default'][1]['count']);
180-
}
181-
182131
private function createEntityMetadata(string $entityFQCN): ClassMetadata
183132
{
184133
$metadata = new ClassMetadata($entityFQCN);

0 commit comments

Comments
 (0)