Lines Matching refs:user
19 $user = $config['ENV']['PDOTEST_USER'] ?? null;
21 if (!$user) {
22 preg_match('/user=([^ ]*)/', $dsnWithCredentials, $match);
23 $user = $match[1] ?? '';
29 $dsn = str_replace("user={$user}", '', $dsnWithCredentials);
33 echo "dsn without credentials / correct user / correct password".PHP_EOL;
35 $db = new PDO($dsn, $user, $password, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
41 echo "dsn with credentials / no user / no password".PHP_EOL;
43 …$db = new PDO("{$dsn} user={$user} password={$password}", null, null, [PDO::ATTR_ERRMODE => PDO::E…
49 echo "dsn with correct user / incorrect user / correct password".PHP_EOL;
51 …$db = new PDO("{$dsn} user={$user}", 'hoge', $password, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTI…
57 echo "dsn with correct password / correct user / incorrect password".PHP_EOL;
59 …$db = new PDO("{$dsn} password={$password}", $user, 'fuga', [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXC…
65 echo "dsn with correct credentials / incorrect user / incorrect password".PHP_EOL;
67 …$db = new PDO("{$dsn} user={$user} password={$password}", 'hoge', 'fuga', [PDO::ATTR_ERRMODE => PD…
74 dsn without credentials / correct user / correct password
77 dsn with credentials / no user / no password
80 dsn with correct user / incorrect user / correct password
83 dsn with correct password / correct user / incorrect password
86 dsn with correct credentials / incorrect user / incorrect password