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