File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
tests/Tests/ORM/Functional/Ticket Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1111use Doctrine \Tests \OrmFunctionalTestCase ;
1212use PHPUnit \Framework \Attributes \Group ;
1313
14+ use function substr_count ;
15+
1416#[Group('DDC-3042 ' )]
1517class DDC3042Test extends OrmFunctionalTestCase
1618{
@@ -23,14 +25,18 @@ protected function setUp(): void
2325
2426 public function testSQLGenerationDoesNotProvokeAliasCollisions (): void
2527 {
26- self ::assertStringNotMatchesFormat (
27- '%sfield11%sfield11%s ' ,
28- $ this
28+ self ::assertSame (
29+ 1 ,
30+ substr_count (
31+ $ this
2932 ->_em
3033 ->createQuery (
3134 'SELECT f, b FROM ' . __NAMESPACE__ . '\DDC3042Foo f JOIN ' . __NAMESPACE__ . '\DDC3042Bar b WITH 1 = 1 ' ,
3235 )
3336 ->getSQL (),
37+ 'field_11 ' ,
38+ ),
39+ 'The alias "field11" should only appear once in the SQL query. ' ,
3440 );
3541 }
3642}
You can’t perform that action at this time.
0 commit comments