2015-01-01 08:10:10 +02:00
|
|
|
<?php
|
|
|
|
/**
|
2015-01-05 10:03:13 +02:00
|
|
|
* @link https://github.com/creocoder/yii2-nested-sets
|
2015-01-01 08:10:10 +02:00
|
|
|
* @copyright Copyright (c) 2015 Alexander Kochetov
|
|
|
|
* @license http://opensource.org/licenses/BSD-3-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace tests;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* DatabaseTestCase
|
|
|
|
*/
|
|
|
|
abstract class DatabaseTestCase extends \PHPUnit_Extensions_Database_TestCase
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @inheritdoc
|
|
|
|
*/
|
|
|
|
public function getConnection()
|
|
|
|
{
|
|
|
|
return $this->createDefaultDBConnection(\Yii::$app->db->pdo);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @inheritdoc
|
|
|
|
*/
|
|
|
|
public function getDataSet()
|
|
|
|
{
|
2015-01-04 13:26:18 +02:00
|
|
|
return $this->createFlatXMLDataSet(__DIR__ . '/data/test.xml');
|
2015-01-01 08:10:10 +02:00
|
|
|
}
|
|
|
|
}
|