cvs: pear /MDB2/tests MDB2_usage_testcase.php
| From: | Lukas Smith | Date: | Mon, 01 May 2006 11:11:39 +0000 |
| Subject: | cvs: pear /MDB2/tests MDB2_usage_testcase.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-39932@lists.php.net to get a copy of this message | ||
lsmith Mon May 1 11:11:39 2006 UTC
Modified files:
/pear/MDB2/tests MDB2_usage_testcase.php
Log:
- increased the size of the test LOBs
http://cvs.php.net/viewcvs.cgi/pear/MDB2/tests/MDB2_usage_testcase.php?r1=1.54&r2=1.55&diff_format=u
Index: pear/MDB2/tests/MDB2_usage_testcase.php
diff -u pear/MDB2/tests/MDB2_usage_testcase.php:1.54 pear/MDB2/tests/MDB2_usage_testcase.php:1.55
--- pear/MDB2/tests/MDB2_usage_testcase.php:1.54 Mon Mar 20 12:34:08 2006
+++ pear/MDB2/tests/MDB2_usage_testcase.php Mon May 1 11:11:39 2006
@@ -41,7 +41,7 @@
// | Author: Paul Cooper <pgc@ucecom.com> |
// +----------------------------------------------------------------------+
//
-// $Id: MDB2_usage_testcase.php,v 1.54 2006/03/20 12:34:08 lsmith Exp $
+// $Id: MDB2_usage_testcase.php,v 1.55 2006/05/01 11:11:39 lsmith Exp $
require_once 'MDB2_testcase.php';
@@ -905,7 +905,7 @@
$character_lob = '';
$binary_lob = '';
- for ($i = 0; $i < 100; $i++) {
+ for ($i = 0; $i < 1000; $i++) {
for ($code = 32; $code <= 127; $code++) {
$character_lob.= chr($code);
}
@@ -976,28 +976,28 @@
$stmt = $this->db->prepare($query, array('document' => 'clob',
'picture' => 'blob'), MDB2_PREPARE_MANIP);
$character_data_file = 'character_data';
- if (($file = fopen($character_data_file, 'w'))) {
- $character_data = '';
- for ($i = 0; $i < 100; $i++) {
- for ($code = 32; $code <= 127; $code++) {
- $character_data.= chr($code);
- }
+ $file = fopen($character_data_file, 'w');
+ $this->assertTrue(((bool)$file), 'Error creating clob file to read from');
+ $character_data = '';
+ for ($i = 0; $i < 1000; $i++) {
+ for ($code = 32; $code <= 127; $code++) {
+ $character_data.= chr($code);
}
- $this->assertTrue((fwrite($file, $character_data, strlen($character_data)) ==
strlen($character_data)), 'Error creating clob file to read from');
- fclose($file);
}
+ $this->assertTrue((fwrite($file, $character_data, strlen($character_data)) ==
strlen($character_data)), 'Error creating clob file to read from');
+ fclose($file);
$binary_data_file = 'binary_data';
- if (($file = fopen($binary_data_file, 'wb'))) {
- $binary_data = '';
- for ($i = 0; $i < 100; $i++) {
- for ($code = 0; $code <= 255; $code++) {
- $binary_data.= chr($code);
- }
+ $file = fopen($binary_data_file, 'wb');
+ $this->assertTrue(((bool)$file), 'Error creating blob file to read from');
+ $binary_data = '';
+ for ($i = 0; $i < 1000; $i++) {
+ for ($code = 0; $code <= 255; $code++) {
+ $binary_data.= chr($code);
}
- $this->assertTrue((fwrite($file, $binary_data, strlen($binary_data)) ==
strlen($binary_data)), 'Error creating blob file to read from');
- fclose($file);
}
+ $this->assertTrue((fwrite($file, $binary_data, strlen($binary_data)) ==
strlen($binary_data)), 'Error creating blob file to read from');
+ fclose($file);
$character_data_file_tmp = 'file://'.$character_data_file;
$stmt->bindParam('document', $character_data_file_tmp);