1 | <?php |
||
15 | final class ImageBuilderTest extends TestCase |
||
16 | { |
||
17 | /** |
||
18 | * @test |
||
19 | */ |
||
20 | public function parseArray(): void |
||
21 | { |
||
22 | $data = [ |
||
23 | "a.jpeg", |
||
24 | "b.png", |
||
25 | "c.gif", |
||
26 | ]; |
||
27 | |||
28 | $builder = new ImageBuilder(); |
||
29 | $imageCollection = $builder->buildFromArray($data); |
||
30 | |||
31 | self::assertInstanceOf(ImageCollection::class, $imageCollection); |
||
32 | self::assertSame(count($data), count($imageCollection->getAll())); |
||
33 | |||
34 | foreach ($imageCollection->getAll() as $image) { |
||
35 | self::assertInstanceOf(Image::class, $image); |
||
36 | } |
||
37 | } |
||
38 | } |
||
39 |