mirror of
https://github.com/werkraum-media/events.git
synced 2024-12-22 08:06:09 +01:00
Fix phpunit deprecation warnings (#8)
This commit is contained in:
parent
a49ba7c4d2
commit
afd8c59c9e
2 changed files with 5 additions and 4 deletions
|
@ -31,7 +31,8 @@ Fixes
|
|||
Tasks
|
||||
-----
|
||||
|
||||
Nothing
|
||||
* Solve PHPUnit deprecation: "Passing an argument of type Generator for the $haystack parameter is deprecated. Support for this will be removed in PHPUnit 10."
|
||||
Migrate iterator to array within tests.
|
||||
|
||||
Deprecation
|
||||
-----------
|
||||
|
|
|
@ -56,7 +56,7 @@ class DatesFactoryTest extends TestCase
|
|||
$result = $subject->createDates($unkownInput, false);
|
||||
|
||||
self::assertInstanceOf(\Generator::class, $result);
|
||||
self::assertCount(0, $result);
|
||||
self::assertCount(0, iterator_to_array($result));
|
||||
}
|
||||
|
||||
public function possibleUnkownInput(): array
|
||||
|
@ -92,7 +92,7 @@ class DatesFactoryTest extends TestCase
|
|||
|
||||
$firstEntry = $result->current();
|
||||
|
||||
self::assertCount(1, $result);
|
||||
self::assertCount(1, iterator_to_array($result));
|
||||
|
||||
self::assertInstanceOf(Date::class, $firstEntry);
|
||||
self::assertSame(1648821600, $firstEntry->getStart()->getTimestamp());
|
||||
|
@ -143,7 +143,7 @@ class DatesFactoryTest extends TestCase
|
|||
|
||||
$firstEntry = $result->current();
|
||||
|
||||
self::assertCount(1, $result);
|
||||
self::assertCount(1, iterator_to_array($result));
|
||||
|
||||
self::assertInstanceOf(Date::class, $firstEntry);
|
||||
self::assertSame(1648821600, $firstEntry->getStart()->getTimestamp());
|
||||
|
|
Loading…
Reference in a new issue