We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a0c007 commit c6f048fCopy full SHA for c6f048f
ext/pdo_mysql/tests/pdo_mysql_basic_connect.phpt
@@ -0,0 +1,27 @@
1
+--TEST--
2
+PDO_MYSQL: basic connection test
3
+--EXTENSIONS--
4
+pdo_mysql
5
+--SKIPIF--
6
+<?php
7
+require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config.inc');
8
+$host = PDO_MYSQL_TEST_HOST;
9
+$port = PDO_MYSQL_TEST_PORT ?? 3306;
10
+$connection = @fsockopen($host, $port);
11
+if (!is_resource($connection)) {
12
+ die('skip: mysql server is not responding');
13
+}
14
+?>
15
+--FILE--
16
17
+require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
18
+
19
+try {
20
+ $db = MySQLPDOTest::factory();
21
+ echo "Connected.\n";
22
+} catch (PDOException $e) {
23
+ echo $e->getMessage();
24
25
26
+--EXPECT--
27
+Connected.
0 commit comments