cvs: pear /MDB2_Schema/tests MDB2_Schema_testcase.php

From: Date: Thu, 23 Feb 2006 19:06:52 +0000
Subject: cvs: pear /MDB2_Schema/tests MDB2_Schema_testcase.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38534@lists.php.net to get a copy of this message
lsmith Thu Feb 23 19:06:52 2006 UTC Modified files: /pear/MDB2_Schema/tests MDB2_Schema_testcase.php Log: - if we cannot create the database, then assume it was created manually http://cvs.php.net/viewcvs.cgi/pear/MDB2_Schema/tests/MDB2_Schema_testcase.php?r1=1.2&r2=1.3&diff_format=u Index: pear/MDB2_Schema/tests/MDB2_Schema_testcase.php diff -u pear/MDB2_Schema/tests/MDB2_Schema_testcase.php:1.2 pear/MDB2_Schema/tests/MDB2_Schema_testcase.php:1.3 --- pear/MDB2_Schema/tests/MDB2_Schema_testcase.php:1.2 Sun Jan 22 18:32:26 2006 +++ pear/MDB2_Schema/tests/MDB2_Schema_testcase.php Thu Feb 23 19:06:52 2006 @@ -41,7 +41,7 @@ // | Author: Paul Cooper <pgc@ucecom.com> | // +----------------------------------------------------------------------+ // -// $Id: MDB2_Schema_testcase.php,v 1.2 2006/01/22 18:32:26 lsmith Exp $ +// $Id: MDB2_Schema_testcase.php,v 1.3 2006/02/23 19:06:52 lsmith Exp $ require_once 'MDB2/Schema.php'; @@ -118,13 +118,20 @@ $result = $this->schema->updateDatabase( $this->driver_input_file, false, - array('create' =>'1', 'name' => $this->database) + array('create' => '1', 'name' => $this->database) ); + if (PEAR::isError($result)) { + $result = $this->schema->updateDatabase( + $this->driver_input_file, + false, + array('create' => '0', 'name' => $this->database) + ); + } if (!PEAR::isError($result)) { $result = $this->schema->updateDatabase( $this->lob_input_file, false, - array('create' =>'0', 'name' => $this->database) + array('create' => '0', 'name' => $this->database) ); } $this->assertFalse(PEAR::isError($result), 'Error creating database');

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