Skip to content

Commit

Permalink
Updated the Mssql tests with fixes of insertMulti.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso committed May 22, 2011
1 parent f0db55d commit 195653b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Cake/Test/Case/Model/Datasource/Database/MssqlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}
}

0 comments on commit 195653b

Please sign in to comment.