Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Desportes <williamdes@wdes.fr>2020-05-24 14:23:53 +0300
committerWilliam Desportes <williamdes@wdes.fr>2020-05-24 14:23:53 +0300
commitc4da7f6a9a82d37950087552c38e2ea7271eeb0f (patch)
treee9d1c6da7d8d0b0808667b80b741a140aa446b68
parent3fe9c3def917c5d2738b34f2ca607eecd9f03f78 (diff)
Remove useless testMySQL
Signed-off-by: William Desportes <williamdes@wdes.fr>
-rw-r--r--test/classes/EnvironmentTest.php42
1 files changed, 0 insertions, 42 deletions
diff --git a/test/classes/EnvironmentTest.php b/test/classes/EnvironmentTest.php
index 31746cc8bf..6dd82a1c45 100644
--- a/test/classes/EnvironmentTest.php
+++ b/test/classes/EnvironmentTest.php
@@ -6,12 +6,8 @@ declare(strict_types=1);
namespace PhpMyAdmin\Tests;
-use PDO;
use PhpMyAdmin\Tests\AbstractTestCase;
-use Throwable;
use const PHP_VERSION;
-use function constant;
-use function preg_match;
use function version_compare;
/**
@@ -31,42 +27,4 @@ class EnvironmentTest extends AbstractTestCase
'phpMyAdmin requires PHP 7.1.3 or above'
);
}
-
- /**
- * Tests MySQL connection
- *
- * @return void
- */
- public function testMySQL()
- {
- AbstractTestCase::defineTestingGlobals();
- try {
- $pdo = new PDO(
- 'mysql:host=' . $GLOBALS['TESTSUITE_SERVER'] . ';port=' . $GLOBALS['TESTSUITE_PORT'],
- $GLOBALS['TESTSUITE_USER'],
- $GLOBALS['TESTSUITE_PASSWORD']
- );
- $this->assertNull(
- $pdo->errorCode(),
- 'Error when trying to connect to database'
- );
-
- $pdo->exec('SHOW DATABASES;');
- $this->assertEquals(
- 0,
- $pdo->errorCode(),
- 'Error trying to show tables for database'
- );
- } catch (Throwable $e) {
- $this->markTestSkipped('Error: ' . $e->getMessage());
- }
-
- // Check id MySQL server is 5 version
- preg_match(
- '/^(\d+)?\.(\d+)?\.(\*|\d+)/',
- $pdo->getAttribute(constant('PDO::ATTR_SERVER_VERSION')),
- $version_parts
- );
- $this->assertEquals(5, $version_parts[1]);
- }
}