We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 25018f0 commit f4d02a5Copy full SHA for f4d02a5
ext/pgsql/tests/changepassword.phpt
@@ -0,0 +1,29 @@
1
+--TEST--
2
+Changing user password with pg_change_password
3
+--EXTENSIONS--
4
+pgsql
5
+--SKIPIF--
6
+<?php include("inc/skipif.inc"); ?>
7
+--FILE--
8
+<?php
9
+include('inc/config.inc');
10
+
11
+$conn = pg_connect($conn_str);
12
13
+try {
14
+ pg_change_password($conn, "", "pass");
15
+} catch (\ValueError $e) {
16
+ echo $e->getMessage() . PHP_EOL;
17
+}
18
19
+ pg_change_password($conn, "user", "");
20
21
22
23
24
+var_dump(pg_change_password($conn, "inexistent_user", "postitpwd"));
25
+?>
26
+--EXPECT--
27
+pg_change_password(): Argument #2 ($user) cannot be empty
28
+pg_change_password(): Argument #3 ($password) cannot be empty
29
+bool(false)
0 commit comments