/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
setup/src/Magento/Setup/Test/Unit/Model/GeneratorTest.php
42 строки
907 B
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 11:23
22 окт 2025, 11:23
6c2f6e6
Код
Авторство
О чём код?
<?php /** * Copyright 2015 Adobe * All Rights Reserved. */ declare(strict_types=1); namespace Magento\Setup\Test\Unit\Model; use Magento\Setup\Model\Generator; use PHPUnit\Framework\TestCase; class GeneratorTest extends TestCase { /** * @test * * @return void */ public function testIteratorInterface() { $pattern = [ 'id' => '%s', 'name' => 'Static', 'calculated' => function ($index) { return $index * 10; }, ]; $model = new Generator($pattern, 2); $rows = []; foreach ($model as $row) { $rows[] = $row; } $this->assertEquals( [ ['id' => '1', 'name' => 'Static', 'calculated' => 10], ['id' => '2', 'name' => 'Static', 'calculated' => 20], ], $rows ); } }