/** * @expectedException Exception */ public function testDatabaseCreateWithNoValue() { $couchdb = new CouchDB(); $couchdb->create_database(); }
* Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy * of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the License for the specific language governing permissions and * limitations under the License. * * Author: Adam Venturella - aventurella@gmail.com * * @package Sample * @author Adam Venturella <*****@*****.**> * @copyright Copyright (C) 2009 Adam Venturella * @license http://www.apache.org/licenses/LICENSE-2.0 Apache 2.0 * **/ /** * Sample */ require 'couchdb/CouchDB.php'; $newdb = 'newdb'; $options = array('database' => $newdb); $db = new CouchDB($options); $db->create_database($newdb); // OR if the 'database' key was specified in the options, // and you wish to create that database, you can call create_database // with no arguments. //$db->create_database();