mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-10-29 01:17:13 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			475 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			475 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * @link https://www.yiiframework.com/
 | |
|  * @copyright Copyright (c) 2008 Yii Software LLC
 | |
|  * @license https://www.yiiframework.com/license/
 | |
|  *
 | |
|  * @var \yiiunit\framework\db\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());
 | 
