1--TEST--
2Test error operation of password_needs_rehash()
3--FILE--
4<?php
5//-=-=-=-
6var_dump(password_needs_rehash());
7
8var_dump(password_needs_rehash(''));
9
10var_dump(password_needs_rehash('', "foo"));
11
12var_dump(password_needs_rehash(array(), 1));
13
14var_dump(password_needs_rehash("", 1, "foo"));
15
16echo "OK!";
17?>
18--EXPECTF--
19Warning: password_needs_rehash() expects at least 2 parameters, 0 given in %s on line %d
20NULL
21
22Warning: password_needs_rehash() expects at least 2 parameters, 1 given in %s on line %d
23NULL
24
25Warning: password_needs_rehash() expects parameter 2 to be long, string given in %s on line %d
26NULL
27
28Warning: password_needs_rehash() expects parameter 1 to be string, array given in %s on line %d
29NULL
30
31Warning: password_needs_rehash() expects parameter 3 to be array, string given in %s on line %d
32NULL
33OK!
34