Skip to content

Commit 5dc67a8

Browse files
Adding test for UseStatementGeneratorTest
1 parent 79b5f28 commit 5dc67a8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/Util/UseStatementGeneratorTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,20 @@ public function testUseStatementsWithAliases(): void
9090
EOT;
9191
self::assertSame($expected, (string) $unsorted);
9292
}
93+
94+
public function testUseStatementsWithDuplicates(): void
95+
{
96+
$unsorted = new UseStatementGenerator([
97+
\Symfony\UX\Turbo\Attribute\Broadcast::class,
98+
\ApiPlatform\Core\Annotation\ApiResource::class,
99+
\ApiPlatform\Core\Annotation\ApiResource::class,
100+
]);
101+
102+
$expected = <<< 'EOT'
103+
use ApiPlatform\Core\Annotation\ApiResource;
104+
use Symfony\UX\Turbo\Attribute\Broadcast;
105+
106+
EOT;
107+
self::assertSame($expected, (string) $unsorted);
108+
}
93109
}

0 commit comments

Comments
 (0)