File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,9 @@ public function total(): int
4040 public function cursor (): Generator
4141 {
4242 foreach ($ this ->items as $ item ) {
43- yield from $ item ->getItems ();
43+ foreach ($ item ->getItems () as $ product ) {
44+ yield $ product ;
45+ }
4446 }
4547 }
4648
Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ public function testModelNotFoundException(): void
233233
234234 self ::assertCount ($ total , $ cart ->getItems ());
235235 self ::assertCount (count ($ products ) - 1 , $ cart ->getBasketDto ()->items ());
236- self ::assertCount ($ total , $ cart ->getBasketDto ()->cursor ());
236+ self ::assertCount ($ total , iterator_to_array ( $ cart ->getBasketDto ()->cursor () ));
237237 self ::assertSame ($ total , $ cart ->getBasketDto ()->total ());
238238
239239 $ transfers = $ buyer ->payCart ($ cart );
You can’t perform that action at this time.
0 commit comments