File tree Expand file tree Collapse file tree 2 files changed +17
-20
lines changed Expand file tree Collapse file tree 2 files changed +17
-20
lines changed Original file line number Diff line number Diff line change @@ -205,14 +205,11 @@ private function getDoctrinePaginator()
205
205
*/
206
206
protected function convertToLaravelPaginator (DoctrinePaginator $ doctrinePaginator , $ perPage , $ page )
207
207
{
208
- $ results = iterator_to_array ($ doctrinePaginator );
209
-
210
- die ('convert ' );
211
- $ path = Paginator::resolveCurrentPath ();
212
- $ query = $ this ->queryParams ;
208
+ $ path = Paginator::resolveCurrentPath ();
209
+ $ query = $ this ->queryParams ;
213
210
214
211
return new LengthAwarePaginator (
215
- $ results ,
212
+ $ doctrinePaginator -> getQuery ()-> getResult () ,
216
213
$ doctrinePaginator ->count (),
217
214
$ perPage ,
218
215
$ page ,
Original file line number Diff line number Diff line change @@ -73,8 +73,6 @@ public function testQueryParametersAreProducedInUrlFromRequest()
73
73
*/
74
74
private function mockEntityManager ()
75
75
{
76
- $ this ->markTestSkipped ('This test is not working anymore ' );
77
-
78
76
/** @var EntityManagerInterface|\Mockery\Mock $em */
79
77
$ em = \Mockery::mock (EntityManagerInterface::class);
80
78
$ config = \Mockery::mock (Configuration::class);
@@ -89,19 +87,21 @@ private function mockEntityManager()
89
87
$ config ->shouldReceive ('getQueryCache ' )->andReturn (null );
90
88
$ config ->shouldReceive ('getQuoteStrategy ' )->andReturn (new DefaultQuoteStrategy );
91
89
90
+ $ id = new stdClass ();
91
+ $ id ->fieldName = 'id ' ;
92
+ $ id ->columnName = 'id ' ;
93
+ $ id ->type = Types::INTEGER ;
94
+ $ id ->id = true ;
95
+ $ id ->options = ['unsigned ' => true ];
96
+
97
+ $ name = new stdClass ();
98
+ $ name ->fieldName = 'name ' ;
99
+ $ name ->columnName = 'name ' ;
100
+ $ name ->type = Types::STRING ;
101
+
92
102
$ metadata ->fieldMappings = [
93
- 'id ' => [
94
- 'fieldName ' => 'id ' ,
95
- 'columnName ' => 'id ' ,
96
- 'type ' => Types::INTEGER ,
97
- 'id ' => true ,
98
- 'options ' => ['unsigned ' => true ],
99
- ],
100
- 'name ' => [
101
- 'fieldName ' => 'name ' ,
102
- 'columnName ' => 'name ' ,
103
- 'type ' => Types::STRING ,
104
- ],
103
+ 'id ' => $ id ,
104
+ 'name ' => $ name ,
105
105
];
106
106
107
107
$ metadata ->subClasses = [];
You can’t perform that action at this time.
0 commit comments