cvs: pear /MDB2/tests MDB2_manager_testcase.php

From: Date: Tue, 12 Feb 2008 23:14:51 +0000
Subject: cvs: pear /MDB2/tests MDB2_manager_testcase.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-50996@lists.php.net to get a copy of this message
quipo Tue Feb 12 23:14:51 2008 UTC Modified files: /pear/MDB2/tests MDB2_manager_testcase.php Log: test VACUUM http://cvs.php.net/viewvc.cgi/pear/MDB2/tests/MDB2_manager_testcase.php?r1=1.62&r2=1.63&diff_format=u Index: pear/MDB2/tests/MDB2_manager_testcase.php diff -u pear/MDB2/tests/MDB2_manager_testcase.php:1.62 pear/MDB2/tests/MDB2_manager_testcase.php:1.63 --- pear/MDB2/tests/MDB2_manager_testcase.php:1.62 Sun Jan 27 18:08:58 2008 +++ pear/MDB2/tests/MDB2_manager_testcase.php Tue Feb 12 23:14:51 2008 @@ -42,7 +42,7 @@ // | Lorenzo Alberton <l dot alberton at quipo dot it> | // +----------------------------------------------------------------------+ // -// $Id: MDB2_manager_testcase.php,v 1.62 2008/01/27 18:08:58 quipo Exp $ +// $Id: MDB2_manager_testcase.php,v 1.63 2008/02/12 23:14:51 quipo Exp $ require_once 'MDB2_testcase.php'; @@ -875,5 +875,33 @@ $this->assertTrue(false, 'Error dropping the function: '.$result->getMessage()); } } + + /** + * Test vacuum + */ + function testVacuum() { + //vacuum table + $result = $this->db->manager->vacuum($this->table); + if (PEAR::isError($result)) { + $this->assertTrue(false, 'Error: cannot vacuum table: ' . $result->getMessage()); + } + + //vacuum and analyze table + $options = array( + 'analyze' => true, + 'full' => true, + 'freeze' => true, + ); + $result = $this->db->manager->vacuum($this->table, $options); + if (PEAR::isError($result)) { + $this->assertTrue(false, 'Error: cannot vacuum table: ' . $result->getMessage()); + } + + //vacuum all tables + $result = $this->db->manager->vacuum(); + if (PEAR::isError($result)) { + $this->assertTrue(false, 'Error: cannot vacuum table: ' . $result->getMessage()); + } + } } ?> \ No newline at end of file

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