Browse Source

Issue #14609: test case for further discussion (#16990)

tags/2.0.16
Pavel Ivanov 6 years ago committed by Alexander Makarov
parent
commit
379a2002dd
  1. 10
      tests/framework/db/CommandTest.php

10
tests/framework/db/CommandTest.php

@ -7,6 +7,7 @@
namespace yiiunit\framework\db;
use ArrayObject;
use yii\caching\FileCache;
use yii\db\Connection;
use yii\db\DataReader;
@ -403,7 +404,14 @@ SQL;
[[new Expression(':qp1', [':qp1' => 42])]], // This example is completely useless. This feature of batchInsert is intended to be used with complex expression objects, such as JsonExpression.
'expected' => "INSERT INTO `type` (`int_col`) VALUES (:qp1)",
'expectedParams' => [':qp1' => 42]
]
],
'batchIsert empty rows represented by ArrayObject' => [
'{{%type}}',
['col'],
new ArrayObject(), // See: https://github.com/yiisoft/yii2/issues/14609
'expected' => '',
'expectedParams' => [],
],
];
}

Loading…
Cancel
Save