Commits

Anatol Belski committed 2178033

fixed the test

Comments (0)

Files changed (2)

tests/07-listener-error-win32.phpt

+--TEST--
+Check for EventListener error behaviour 
+--SKIPIF--
+<?php
+if (!class_exists("EventListener")) die("skip Event extra functions are disabled");
+if ( substr(PHP_OS, 0, 3) != "WIN" ) die('skip Run only on Windows');
+?>
+--FILE--
+<?php
+$base = new EventBase();
+
+$sock_paths = array (
+	sys_get_temp_dir() . DIRECTORY_SEPARATOR . mt_rand().".sock"      => FALSE,
+);
+
+foreach ($sock_paths as $path => $expect) {
+	$listener = @new EventListener($base, function() {}, NULL, 0, -1, $path);
+	if (file_exists($path)) unlink($path);
+
+	var_dump(is_null($listener) != $expect);
+}
+
+?>
+--EXPECT--
+bool(true)

tests/07-listener-error.phpt

 Check for EventListener error behaviour 
 --SKIPIF--
 <?php
-if (!class_exists("EventListener")) echo "skip Event extra functions are disabled"
+if (!class_exists("EventListener")) die("skip Event extra functions are disabled");
+if (substr(PHP_OS, 0, 3) == "WIN") die('skip Not for Windows');
 ?>
 --FILE--
 <?php