mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-16 07:11:19 +08:00
23 lines
477 B
PHP
23 lines
477 B
PHP
<?php
|
|
/**
|
|
* @link https://www.yiiframework.com/
|
|
* @copyright Copyright (c) 2008 Yii Software LLC
|
|
* @license https://www.yiiframework.com/license/
|
|
*/
|
|
|
|
/* @var $this \yiiunit\framework\db\CommandTest */
|
|
|
|
$rows = call_user_func(function () {
|
|
if (false) {
|
|
yield [];
|
|
}
|
|
});
|
|
|
|
$command = $this->getConnection()->createCommand();
|
|
$command->batchInsert(
|
|
'{{customer}}',
|
|
['email', 'name', 'address'],
|
|
$rows
|
|
);
|
|
$this->assertEquals(0, $command->execute());
|