1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00
Files
archived-php-src/ext/snmp/tests/bug64159.phpt
Christoph M. Becker 97ea6ad0e6 Test snmp on Windows CI
We use the snmpd which is now bundled with the net-snmp dependency, and
the MIBS which are also shipped with it.

We also fix the tests/snmpd.conf, and mark two failing tests as XFAIL.

Closes GH-8503.
2022-05-11 13:24:23 +02:00

28 lines
606 B
PHP

--TEST--
Bug #64159: Truncated snmpget
--CREDITS--
Boris Lytochkin
--EXTENSIONS--
snmp
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
if (PHP_OS_FAMILY === "Windows") die("xfail fails on Windows for unknown reasons");
?>
--ENV--
MIBS=noneXistent
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
snmp_set_quick_print(false);
snmp_set_valueretrieval(SNMP_VALUE_LIBRARY);
var_dump(("ab8283f948419b2d24d22f44a80b17d3" === md5(snmpget($hostname, $community, '.1.3.6.1.4.1.2021.8.1.101.1'))));
?>
--EXPECTF--
MIB search path: %s
Cannot find module (noneXistent): At line %d in (%s)
bool(true)