4 * Class CRM_Utils_SQL_SelectTest
7 class CRM_Utils_SQL_InsertTest
extends CiviUnitTestCase
{
9 public function testRow_twice() {
10 $insert = CRM_Utils_SQL_Insert
::into('foo')
11 ->row(array('first' => '1', 'second' => '2'))
12 ->row(array('second' => '2b', 'first' => '1b'));
14 INSERT INTO foo (`first`,`second`) VALUES
18 $this->assertLike($expected, $insert->toSQL());
21 public function testRows() {
22 $insert = CRM_Utils_SQL_Insert
::into('foo')
23 ->row(array('first' => '1', 'second' => '2'))
25 array('second' => '2b', 'first' => '1b'),
26 array('first' => '1c', 'second' => '2c'),
28 ->row(array('second' => '2d', 'first' => '1d'));
30 INSERT INTO foo (`first`,`second`) VALUES
36 $this->assertLike($expected, $insert->toSQL());