cvs: pear /MDB2/tests MDB2_manager_testcase.php MDB2_reverse_testcase.php

From: Date: Mon, 01 May 2006 11:11:01 +0000
Subject: cvs: pear /MDB2/tests MDB2_manager_testcase.php MDB2_reverse_testcase.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-39931@lists.php.net to get a copy of this message
lsmith Mon May 1 11:11:01 2006 UTC Modified files: /pear/MDB2/tests MDB2_manager_testcase.php MDB2_reverse_testcase.php Log: - since we no longer complain about primary keys not being called primary we can remove the necessary hacks http://cvs.php.net/viewcvs.cgi/pear/MDB2/tests/MDB2_manager_testcase.php?r1=1.45&r2=1.46&diff_format=u Index: pear/MDB2/tests/MDB2_manager_testcase.php diff -u pear/MDB2/tests/MDB2_manager_testcase.php:1.45 pear/MDB2/tests/MDB2_manager_testcase.php:1.46 --- pear/MDB2/tests/MDB2_manager_testcase.php:1.45 Thu Mar 23 12:29:37 2006 +++ pear/MDB2/tests/MDB2_manager_testcase.php Mon May 1 11:11:00 2006 @@ -42,7 +42,7 @@ // | Lorenzo Alberton <l dot alberton at quipo dot it> | // +----------------------------------------------------------------------+ // -// $Id: MDB2_manager_testcase.php,v 1.45 2006/03/23 12:29:37 quipo Exp $ +// $Id: MDB2_manager_testcase.php,v 1.46 2006/05/01 11:11:00 lsmith Exp $ require_once 'MDB2_testcase.php'; @@ -262,11 +262,6 @@ ); $name = 'pkindex'; $result = $this->db->manager->createConstraint($this->table, $name, $index); - if (PEAR::isError($result)) { - echo 'Error creating primary index, trying with name "primary" instead .. '; - $name = 'primary'; - $result = $this->db->manager->createConstraint($this->table, $name, $index); - } $this->assertFalse(PEAR::isError($result), 'Error creating primary index'); } @@ -308,14 +303,9 @@ $name = 'pkindex'; $result = $this->db->manager->createConstraint($this->table, $name, $index); if (PEAR::isError($result)) { - echo 'Error creating primary index, trying with name "primary" instead .. '; - $name = 'primary'; - $result = $this->db->manager->createConstraint($this->table, $name, $index); - } - if (PEAR::isError($result)) { $this->assertFalse(true, 'Error creating primary index'); } else { - $result = $this->db->manager->dropConstraint($this->table, $name); + $result = $this->db->manager->dropConstraint($this->table, $name, true); $this->assertFalse(PEAR::isError($result), 'Error dropping primary key index'); } } http://cvs.php.net/viewcvs.cgi/pear/MDB2/tests/MDB2_reverse_testcase.php?r1=1.30&r2=1.31&diff_format=u Index: pear/MDB2/tests/MDB2_reverse_testcase.php diff -u pear/MDB2/tests/MDB2_reverse_testcase.php:1.30 pear/MDB2/tests/MDB2_reverse_testcase.php:1.31 --- pear/MDB2/tests/MDB2_reverse_testcase.php:1.30 Sun Apr 16 17:44:10 2006 +++ pear/MDB2/tests/MDB2_reverse_testcase.php Mon May 1 11:11:01 2006 @@ -41,7 +41,7 @@ // | Author: Lorenzo Alberton <l dot alberton at quipo dot it> | // +----------------------------------------------------------------------+ // -// $Id: MDB2_reverse_testcase.php,v 1.30 2006/04/16 17:44:10 lsmith Exp $ +// $Id: MDB2_reverse_testcase.php,v 1.31 2006/05/01 11:11:01 lsmith Exp $ require_once 'MDB2_testcase.php'; @@ -164,11 +164,6 @@ } foreach ($this->constraints as $constraint_name => $constraint) { $result = $this->db->manager->createConstraint($this->table, $constraint_name, $constraint); - if (PEAR::isError($result) && isset($constraint['primary']) && $constraint['primary']) { - echo 'Error creating primary constraint, trying with name "primary" instead .. '; - $name = 'primary'; - $result = $this->db->manager->createConstraint($this->table, $name, $constraint); - } $this->assertFalse(PEAR::isError($result), 'Error creating constraint: '.$constraint_name); } }

« previous php.pear.cvs (#39931) next »