cvs: pear /MDB2/tests MDB2_reverse_testcase.php
| From: | Lorenzo Alberton | Date: | Mon, 17 Oct 2005 11:36:20 +0000 |
| Subject: | cvs: pear /MDB2/tests MDB2_reverse_testcase.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-35644@lists.php.net to get a copy of this message | ||
quipo Mon Oct 17 07:36:20 2005 EDT
Modified files:
/pear/MDB2/tests MDB2_reverse_testcase.php
Log:
skip further calls in case of error
http://cvs.php.net/diff.php/pear/MDB2/tests/MDB2_reverse_testcase.php?r1=1.17&r2=1.18&ty=u
Index: pear/MDB2/tests/MDB2_reverse_testcase.php
diff -u pear/MDB2/tests/MDB2_reverse_testcase.php:1.17
pear/MDB2/tests/MDB2_reverse_testcase.php:1.18
--- pear/MDB2/tests/MDB2_reverse_testcase.php:1.17 Mon Oct 17 04:07:32 2005
+++ pear/MDB2/tests/MDB2_reverse_testcase.php Mon Oct 17 07:36:19 2005
@@ -41,7 +41,7 @@
// | Author: Lorenzo Alberton <l dot alberton at quipo dot it> |
// +----------------------------------------------------------------------+
//
-// $Id: MDB2_reverse_testcase.php,v 1.17 2005/10/17 08:07:32 lsmith Exp $
+// $Id: MDB2_reverse_testcase.php,v 1.18 2005/10/17 11:36:19 quipo Exp $
require_once 'MDB2_TestCase.php';
@@ -193,11 +193,14 @@
//test
foreach ($indices as $index_name => $index) {
$result = $this->db->reverse->getTableIndexDefinition($table, $index_name);
- $this->assertFalse(PEAR::isError($result), 'Error getting table index
definition');
- $field_names = array_keys($index['fields']);
- $this->assertEquals($field_names, array_keys($result['fields']),
'Error listing index fields');
- if (!empty($index['unique'])) {
- $this->assertTrue($result['unique'], 'Error: missing UNIQUE
constraint');
+ if (PEAR::isError($result)) {
+ $this->assertFalse(true, 'Error getting table index definition');
+ } else {
+ $field_names = array_keys($index['fields']);
+ $this->assertEquals($field_names, array_keys($result['fields']),
'Error listing index fields');
+ if (!empty($index['unique'])) {
+ $this->assertTrue($result['unique'], 'Error: missing UNIQUE
constraint');
+ }
}
}
}