summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/database_test.test
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest/tests/database_test.test')
-rw-r--r--modules/simpletest/tests/database_test.test3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/simpletest/tests/database_test.test b/modules/simpletest/tests/database_test.test
index 0263036ef..e5d5b3fe0 100644
--- a/modules/simpletest/tests/database_test.test
+++ b/modules/simpletest/tests/database_test.test
@@ -2446,6 +2446,9 @@ class DatabaseInvalidDataTestCase extends DatabaseTestCase {
$this->pass(t('The whole transaction is rolled back when a duplicate key insert occurs.'));
}
+ // 23000 means "Integrity constraint violation" according to ANSI SQL.
+ $this->assertEqual($e->errorInfo[0], '23000', t('Exception has proper SQLSTATE.'));
+
// Ensure the other values were not inserted.
$record = db_select('test')
->fields('test', array('name', 'age'))