ci: add 8.1
[m6w6/ext-pq] / tests / lob004.phpt
1 --TEST--
2 large object import/export
3 --SKIPIF--
4 <?php include "_skipif.inc"; ?>
5 --CLEAN--
6 <?php unlink("lob004.tmp"); ?>
7 --FILE--
8 <?php
9 echo "Test\n";
10
11 include "_setup.inc";
12
13 $c = new pq\Connection(PQ_DSN);
14 $t = new pq\Transaction($c);
15
16 $oid = $t->importLOB(__FILE__);
17 var_dump($oid);
18 $t->exportLOB($oid, "lob004.tmp");
19
20 var_dump(md5_file(__FILE__)===md5_file("lob004.tmp"));
21
22 ?>
23 DONE
24 --EXPECTF--
25 Test
26 int(%d)
27 bool(true)
28 DONE
29