File tree 1 file changed +18
-0
lines changed
tests/Type/Doctrine/data/QueryResult
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 10
10
11
11
class QueryBuilderGetQuery
12
12
{
13
+ private function getQueryBuilderMany (EntityManagerInterface $ em ): QueryBuilder
14
+ {
15
+ return $ em ->createQueryBuilder ()
16
+ ->select ('m ' )
17
+ ->from (Many::class, 'm ' );
18
+ }
19
+
20
+ public function addAndWhereAndGetQuery (EntityManagerInterface $ em ): void
21
+ {
22
+ $ qb = $ this ->getQueryBuilderMany ($ em )->andWhere ('m.intColumn = 1 ' );
23
+ assertType ('array<QueryResult\Entities\Many> ' , $ qb ->getQuery ()->getResult ());
24
+ }
25
+
26
+ public function getQueryDirectly (EntityManagerInterface $ em ): void
27
+ {
28
+ assertType ('array<QueryResult\Entities\Many> ' , $ this ->getQueryBuilderMany ($ em )->getQuery ()->getResult ());
29
+ }
30
+
13
31
public function testQueryTypeParametersAreInfered (EntityManagerInterface $ em ): void
14
32
{
15
33
$ query = $ em ->createQueryBuilder ()
You can’t perform that action at this time.
0 commit comments