cvs: pear /MDB2/tests MDB2_manager_testcase.php

From: Date: Sun, 07 Nov 2004 17:22:49 +0000
Subject: cvs: pear /MDB2/tests MDB2_manager_testcase.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-25736@lists.php.net to get a copy of this message
danielc Sun Nov 7 12:22:49 2004 EDT Modified files: /pear/MDB2/tests MDB2_manager_testcase.php Log: * mssql uses same error code for no such table and no such database, plus doesn't seem to say can not drop. So add this workaround. http://cvs.php.net/diff.php/pear/MDB2/tests/MDB2_manager_testcase.php?r1=1.6&r2=1.7&ty=u Index: pear/MDB2/tests/MDB2_manager_testcase.php diff -u pear/MDB2/tests/MDB2_manager_testcase.php:1.6 pear/MDB2/tests/MDB2_manager_testcase.php:1.7 --- pear/MDB2/tests/MDB2_manager_testcase.php:1.6 Thu Oct 28 18:24:34 2004 +++ pear/MDB2/tests/MDB2_manager_testcase.php Sun Nov 7 12:22:49 2004 @@ -41,7 +41,7 @@ // | Author: Paul Cooper <pgc@ucecom.com> | // +----------------------------------------------------------------------+ // -// $Id: MDB2_manager_testcase.php,v 1.6 2004/10/28 22:24:34 lsmith Exp $ +// $Id: MDB2_manager_testcase.php,v 1.7 2004/11/07 17:22:49 danielc Exp $ require_once 'MDB2/Tools/Manager.php'; @@ -107,7 +107,11 @@ if (!$this->methodExists($this->manager->db->manager, 'dropDatabase')) { return; } - $this->manager->db->expectError(MDB2_ERROR_CANNOT_DROP); + if ($this->manager->db->phptype == 'mssql') { + $this->manager->db->expectError(MDB2_ERROR_NOSUCHTABLE); + } else { + $this->manager->db->expectError(MDB2_ERROR_CANNOT_DROP); + } $result = $this->manager->db->manager->dropDatabase($this->database); $this->manager->db->popExpect(); if (!MDB2::isError($result) || $result->getCode() != MDB2_ERROR_UNSUPPORTED) {

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