Lines Matching refs:user
20 $user = $config['ENV']['PDOTEST_USER'] ?? null;
22 if (!$user) {
23 preg_match('/user=([^ ]*)/', $dsnWithCredentials, $match);
24 $user = $match[1] ?? '';
30 $dsn = str_replace("user={$user}", '', $dsnWithCredentials);
34 echo "dsn without credentials / correct user / correct password".PHP_EOL;
36 $db = new PDO($dsn, $user, $password, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
42 echo "dsn with credentials / no user / no password".PHP_EOL;
44 …$db = new PDO("{$dsn} user={$user} password={$password}", null, null, [PDO::ATTR_ERRMODE => PDO::E…
50 echo "dsn with correct user / incorrect user / correct password".PHP_EOL;
52 …$db = new PDO("{$dsn} user={$user}", 'hoge', $password, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTI…
58 echo "dsn with correct password / correct user / incorrect password".PHP_EOL;
60 …$db = new PDO("{$dsn} password={$password}", $user, 'fuga', [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXC…
66 echo "dsn with correct credentials / incorrect user / incorrect password".PHP_EOL;
68 …$db = new PDO("{$dsn} user={$user} password={$password}", 'hoge', 'fuga', [PDO::ATTR_ERRMODE => PD…
75 dsn without credentials / correct user / correct password
78 dsn with credentials / no user / no password
81 dsn with correct user / incorrect user / correct password
84 dsn with correct password / correct user / incorrect password
87 dsn with correct credentials / incorrect user / incorrect password