cvs: pear /MDB setup_test.php

From: Date: Mon, 12 Aug 2002 12:28:15 +0000
Subject: cvs: pear /MDB setup_test.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-5700@lists.php.net to get a copy of this message
lsmith Mon Aug 12 08:28:15 2002 EDT Modified files: /pear/MDB setup_test.php Log: PEAR CS fixes Index: pear/MDB/setup_test.php diff -u pear/MDB/setup_test.php:1.6 pear/MDB/setup_test.php:1.7 --- pear/MDB/setup_test.php:1.6 Mon Jul 29 16:02:52 2002 +++ pear/MDB/setup_test.php Mon Aug 12 08:28:15 2002 @@ -42,9 +42,12 @@ // | Author: Manuel Lemos <mlemos@acm.org> | // +----------------------------------------------------------------------+ // -// $Id: setup_test.php,v 1.6 2002/07/29 20:02:52 lsmith Exp $ +// $Id: setup_test.php,v 1.7 2002/08/12 12:28:15 lsmith Exp $ // +require("manager.php"); +require("metabase_wrapper.php"); + /** * Part of Metabase test suite * @@ -52,44 +55,42 @@ * @author Manuel Lemos <mlemos@acm.org>> */ - require("manager.php"); - require("metabase_wrapper.php"); - -Function Output($message) +function Output($message) { echo $message,"\n"; } -Function Dump($output) +function Dump($output) { echo $output; } - $input_file=($argc<2 ? "test.schema" : $argv[1]); - $variables=array( - "create"=>"1" - ); - $arguments=array( - "Type"=>"mysql", - "User"=>"metapear", - "Password"=>"funky", - "Debug"=>"Output" - ); - $manager=new metabase_manager_class; - $manager->debug="Output"; - $success=$manager->UpdateDatabase($input_file,$input_file.".before",$arguments,$variables); - if($success) - { - echo $manager->DumpDatabase(array( - "Output"=>"Dump", - "EndOfLine"=>"\n" - )); - } - else - echo "Error: ".$manager->error."\n"; - if(count($manager->warnings)>0) - echo "WARNING:\n",implode($manager->warnings,"!\n"),"\n"; - if($manager->database) - echo MetabaseDebugOutput($manager->database); +$input_file = ($argc<2 ? "test.schema" : $argv[1]); +$variables = array( + "create" => "1" +); +$arguments = array( + "Type" => "mysql", + "User" => "metapear", + "Password" => "funky", + "Debug" => "Output" +); +$manager = new metabase_manager_class; +$manager->debug = "Output"; +$success = $manager->UpdateDatabase($input_file, $input_file.".before", $arguments, $variables); +if($success) { + echo $manager->DumpDatabase(array( + "Output" => "Dump", + "EndOfLine" => "\n" + )); +} else { + echo "Error: ".$manager->error."\n"; +} +if(count($manager->warnings) >0 ) { + echo "WARNING:\n",implode($manager->warnings,"!\n"),"\n"; +} +if($manager->database) { + echo MetabaseDebugOutput($manager->database); +} -?> +?> \ No newline at end of file

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