<?php
/**
 * Test database configuration.
 */
return [
    'default-connection' => 'travis',
    'connections' => [
        'travis' => [
            'driver' => 'c5_pdo_mysql',
            'server' => '127.0.0.1',
            'database' => 'concrete5_tests',
            'username' => 'travis',
            'password' => '',
            'charset' => 'utf8',
            'driverOptions' => [
                PDO::MYSQL_ATTR_INIT_COMMAND => "SET SESSION sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'",
            ],
        ],
        'travisWithoutDB' => [
            'driver' => 'c5_pdo_mysql',
            'server' => '127.0.0.1',
            'username' => 'travis',
            'password' => '',
            'charset' => 'utf8',
            'driverOptions' => [
                PDO::MYSQL_ATTR_INIT_COMMAND => "SET SESSION sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'",
            ],
        ],
    ],
];

<?php
/**
 * Test database configuration.
 */
return [
    'default-connection' => 'travis',
    'connections' => [
        'travis' => [
            'driver' => 'c5_pdo_mysql',
            'server' => 'localhost',
            'database' => 'concrete5_tests',
            'username' => 'travis',
            'password' => '',
            'charset' => 'utf8',
            'driverOptions' => [
                PDO::MYSQL_ATTR_INIT_COMMAND => "SET SESSION sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'",
            ],
        ],
        'travisWithoutDB' => [
            'driver' => 'c5_pdo_mysql',
            'server' => 'localhost',
            'username' => 'travis',
            'password' => '',
            'charset' => 'utf8',
            'driverOptions' => [
                PDO::MYSQL_ATTR_INIT_COMMAND => "SET SESSION sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'",
            ],
        ],
    ],
];

--- 
+++ 
@@ -7,7 +7,7 @@
     'connections' => [
         'travis' => [
             'driver' => 'c5_pdo_mysql',
-            'server' => 'localhost',
+            'server' => '127.0.0.1',
             'database' => 'concrete5_tests',
             'username' => 'travis',
             'password' => '',
@@ -18,7 +18,7 @@
         ],
         'travisWithoutDB' => [
             'driver' => 'c5_pdo_mysql',
-            'server' => 'localhost',
+            'server' => '127.0.0.1',
             'username' => 'travis',
             'password' => '',
             'charset' => 'utf8',
Use 127.0.0.1 instead of localhost in test DB connection

Using localhost prevents from running tests in WSL
