hackzilla-project / TicketBundle

Bundle provides multilingual ticketing functionality for Symfony applications.
http://hackzilla.org
MIT License
64 stars 43 forks source link

missing join for knp paginator (sorting by user) #281

Closed regisgrison closed 2 years ago

regisgrison commented 2 years ago

Sorry, I forgot to include this change in the previous fix about the same bug (500 error when sorting ticjets by user).

hackzilla commented 2 years ago

Happy to merge this but I can see that this appears to have broken a test

regisgrison commented 2 years ago

Well... You're right but I don't understand why:

hackzilla commented 2 years ago

I've realised that the test is broken because I never mocked innerJoin. If you add this to your PR, I can then merge it.

index 1604f1a..286217e 100644
--- a/Tests/Manager/TicketManagerTest.php
+++ b/Tests/Manager/TicketManagerTest.php
@@ -40,6 +40,10 @@ final class TicketManagerTest extends WebTestCase
             ->method('orderBy')
             ->willReturn($qb)
         ;
+        $qb
+            ->method('innerJoin')
+            ->willReturn($qb)
+        ;
         $qb
             ->method('andWhere')
             ->willReturn($qb)
regisgrison commented 2 years ago

Hi,

I've done what you asked.

I guess it's correct because I can see "All checks have passed".

Regards.