Newer
Older
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
namespace Piwik\Tests\Integration;
use Piwik\Db;
Thomas Steur
a validé
use Piwik\Tests\Framework\TestCase\IntegrationTestCase;
/**
* @group Core
*/
class TravisEnvironmentTest extends IntegrationTestCase
{
public function testUsageOfCorrectMysqlAdapter()
{
$mysqlAdapter = getenv('MYSQL_ADAPTER');
if (empty($mysqlAdapter)) {
return;
$this->assertTrue(in_array($mysqlAdapter, array('PDO_MYSQL', 'PDO\MYSQL', 'MYSQLI')));
switch ($mysqlAdapter) {
case 'PDO_MYSQL':
$this->assertInstanceOf('Piwik\Db\Adapter\Pdo\Mysql', $db);
break;
case 'MYSQLI':
$this->assertInstanceOf('Piwik\Db\Adapter\Mysqli', $db);