File: 002.phpt

package info (click to toggle)
php-zstd 0.14.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,536 kB
  • sloc: ansic: 30,009; asm: 382; xml: 179; makefile: 3
file content (31 lines) | stat: -rw-r--r-- 747 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--TEST--
zstd_compress(): error conditions
--SKIPIF--
<?php
if (PHP_VERSION_ID >= 80000) die("skip requires PHP <8.0");
--FILE--
<?php
include(dirname(__FILE__) . '/data.inc');

echo "*** Testing zstd_compress() function with Zero arguments ***", PHP_EOL;
var_dump(zstd_compress());

echo "*** Testing with incorrect parameters ***", PHP_EOL;

class Tester {
}

$testclass = new Tester();
var_dump(zstd_compress($testclass));
?>
===Done===
--EXPECTF--
*** Testing zstd_compress() function with Zero arguments ***

Warning: zstd_compress() expects at least 1 parameter, 0 given in %s on line %d
bool(false)
*** Testing with incorrect parameters ***

Warning: zstd_compress(): expects parameter to be string. in %s on line %d
bool(false)
===Done===