PATH:
opt
/
alt
/
tests
/
alt-php84-pecl-rrd_2.0.3-1.el8
/
tests
--TEST-- RRDGraph saveVerbose full export test --SKIPIF-- <?php include('skipif.inc'); include('data/definition.inc'); if (!file_exists($data_updatedDb)) { die("skip $data_updatedDb doesn't exist"); } ?> --FILE-- <?php include('data/definition.inc'); $rrdFile = $data_updatedDb; $outputPngFile = "-"; $graphObj = new RRDGraph($outputPngFile); $graphObj->setOptions(array( "--start" => "920804400", "--end" => 920808000, "--vertical-label" => "m/s", "DEF:myspeed=$rrdFile:speed:AVERAGE", "CDEF:realspeed=myspeed,1000,*", "LINE2:realspeed#FF0000" )); $output = $graphObj->saveVerbose(); $imgData = $output["image"]; unset($output["image"]); //output without img data var_dump($output); //detection of correct PNG header var_dump(substr($imgData, 0, 8) == "\x89PNG\x0d\x0a\x1a\x0a"); ?> --EXPECTF-- array(10) { ["graph_left"]=> int(67) ["graph_top"]=> int(%d) ["graph_width"]=> int(400) ["graph_height"]=> int(100) ["image_width"]=> int(497) ["image_height"]=> int(%d) ["graph_start"]=> int(920804400) ["graph_end"]=> int(920808000) ["value_min"]=> float(0) ["value_max"]=> float(40) } bool(true)
[-] rrd_010.phpt
[edit]
[-] rrd_014.phpt
[edit]
[-] rrdtool-bin.inc.in
[edit]
[-] rrd_019.phpt
[edit]
[-] rrd_009.phpt
[edit]
[-] rrd_011.phpt
[edit]
[-] rrd_005.phpt
[edit]
[-] rrd_017.phpt
[edit]
[-] rrd_018.phpt
[edit]
[-] rrd_006.phpt
[edit]
[-] rrd_022.phpt
[edit]
[-] rrd_004.phpt
[edit]
[-] rrd_003.phpt
[edit]
[-] rrd_012.phpt
[edit]
[-] rrd_015.phpt
[edit]
[-] rrd_020.phpt
[edit]
[-] rrd_008.phpt
[edit]
[-] rrd_007.phpt
[edit]
[+]
..
[-] rrd_001.phpt
[edit]
[-] rrdtool-bin.inc
[edit]
[-] rrd_002.phpt
[edit]
[-] rrd_021.phpt
[edit]
[-] rrd_013.phpt
[edit]
[+]
data
[-] rrd_016.phpt
[edit]
[-] skipif.inc
[edit]