File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
tests/Type/Doctrine/data/QueryResult Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1010
1111class QueryBuilderGetQuery
1212{
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+
1331 public function testQueryTypeParametersAreInfered (EntityManagerInterface $ em ): void
1432 {
1533 $ query = $ em ->createQueryBuilder ()
You can’t perform that action at this time.
0 commit comments