File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -261,17 +261,14 @@ public static function lastReturnKeyResortKeyDataProvider(): array
261261
262262 public function testLastKeepCurrentOriginalData (): void
263263 {
264- $ obj = new stdClass ();
265- $ obj ->data = new ArrayIterator ([new DateTime ('now ' ), new DateTimeImmutable ('now ' ), new stdClass ()]);
264+ $ data = [new DateTime ('now ' ), new DateTimeImmutable ('now ' ), new stdClass ()];
266265
267266 // get last
268- $ last = Finder::last ($ obj -> data , static fn (object $ datum ): bool => $ datum instanceof DateTimeInterface);
267+ $ last = Finder::last ($ data , static fn (object $ datum ): bool => $ datum instanceof DateTimeInterface);
269268 $ this ->assertInstanceOf (DateTimeImmutable::class, $ last );
270269
271270 // keep first record not changed from data
272- $ this ->assertInstanceOf (DateTime::class, $ obj ->data [0 ]);
273- $ arrayCopy = $ obj ->data ->getArrayCopy ();
274- $ this ->assertSame (DateTime::class, current ($ arrayCopy )::class);
271+ $ this ->assertSame (DateTime::class, current ($ data )::class);
275272 }
276273
277274 #[DataProvider('rowsDataProvider ' )]
You can’t perform that action at this time.
0 commit comments