Skip to content
Extraits de code Groupes Projets
Valider 3755bfad rédigé par Thomas Steur's avatar Thomas Steur
Parcourir les fichiers

refs #4233 check if it creates the correct instance

parent 44a6d8c6
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -13,8 +13,22 @@ class TravisEnvironmentTest extends PHPUnit_Framework_TestCase ...@@ -13,8 +13,22 @@ class TravisEnvironmentTest extends PHPUnit_Framework_TestCase
{ {
$mysqlAdapter = getenv('MYSQL_ADAPTER'); $mysqlAdapter = getenv('MYSQL_ADAPTER');
if (!empty($mysqlAdapter)) { if (empty($mysqlAdapter)) {
$this->assertTrue(in_array($mysqlAdapter, array('PDO_MYSQL', 'MYSQLI'))); return;
} }
$this->assertTrue(in_array($mysqlAdapter, array('PDO_MYSQL', 'MYSQLI')));
$db = Piwik\Db::get();
switch ($mysqlAdapter) {
case 'PDO_MYSQL':
$this->assertInstanceOf('\Piwik\Db\Adapter\Pdo\Mysql', $db);
break;
case 'MYSQLI':
$this->assertInstanceOf('\Piwik\Db\Adapter\Mysqli', $db);
break;
}
} }
} }
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter