Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated the Mssql tests with fixes of insertMulti.

  • Loading branch information...
commit 195653bdfcb6df3b7bc846d0f298515949691a6b 1 parent f0db55d
@jrbasso jrbasso authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/Cake/Test/Case/Model/Datasource/Database/MssqlTest.php
View
7 lib/Cake/Test/Case/Model/Datasource/Database/MssqlTest.php
@@ -557,6 +557,8 @@ public function testInsertMulti() {
$result = $this->db->simulated;
$expected = array(
'SET IDENTITY_INSERT [mssql_test_models] ON',
+ "INSERT INTO [mssql_test_models] ([id], [name], [login]) VALUES (1, 'Larry', 'PhpNut')",
+ "INSERT INTO [mssql_test_models] ([id], [name], [login]) VALUES (2, 'Renan', 'renan.saddam')",
'SET IDENTITY_INSERT [mssql_test_models] OFF'
);
$this->assertEqual($expected, $result);
@@ -568,7 +570,10 @@ public function testInsertMulti() {
$this->db->simulated = array();
$this->db->insertMulti($this->model, $fields, $values);
$result = $this->db->simulated;
- $expected = array();
+ $expected = array(
+ "INSERT INTO [mssql_test_models] ([name], [login]) VALUES ('Larry', 'PhpNut')",
+ "INSERT INTO [mssql_test_models] ([name], [login]) VALUES ('Renan', 'renan.saddam')",
+ );
$this->assertEqual($expected, $result);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.