release 2.1.6
[m6w6/ext-pq] / tests / lob001.phpt
index 7f91f645788215e6cc0ed1e75bea9c32eac2a325..19587e1e2d37c15eb458d0c358c13adbc79f8799 100644 (file)
@@ -12,12 +12,15 @@ $c = new pq\Connection(PQ_DSN);
 $t = $c->startTransaction();
 
 $lob = $t->createLOB();
+
+var_dump($lob->transaction === $t);
+
 $lob->write(file_get_contents(__FILE__));
 var_dump($lob->tell());
 
 $lob->seek(0, SEEK_SET);
 $dat = $lob->read(filesize(__FILE__));
-var_dump(hash("md5", $dat)==hash_file("md5", __FILE__));
+var_dump(md5($dat)===md5_file(__FILE__));
 
 $lob->truncate(5);
 
@@ -31,7 +34,8 @@ $t->unlinkLOB($lob->oid);
 DONE
 --EXPECTF--
 Test
-int(451)
+bool(true)
+int(474)
 bool(true)
 string(5) "%c?php"
 DONE