@ -33,6 +33,12 @@ class BarBehavior extends Behavior
class BehaviorTest extends TestCase
{
protected function setUp()
parent::setUp();
$this->mockApplication();
}
public function testAttachAndAccessing()
$bar = new BarClass();
@ -27,6 +27,7 @@ class ComponentTest extends TestCase
$this->component = new NewComponent();
@ -12,6 +12,12 @@ use yiiunit\data\base\InvalidRulesModel;
*/
class ModelTest extends TestCase
public function testGetAttributeLabel()
$speaker = new Speaker();
@ -17,6 +17,7 @@ class ObjectTest extends TestCase
$this->object = new NewObject;
@ -20,6 +20,7 @@ class AssetControllerTest extends TestCase
public function setUp()
$this->testFilePath = Yii::getAlias('@yiiunit/runtime') . DIRECTORY_SEPARATOR . get_class($this);
$this->createDir($this->testFilePath);
$this->testAssetsBasePath = $this->testFilePath . DIRECTORY_SEPARATOR . 'assets';
@ -14,6 +14,7 @@ class ActiveRecordTest extends DatabaseTestCase
ActiveRecord::$db = $this->getConnection();
@ -9,6 +9,12 @@ use yii\db\DataReader;
class CommandTest extends DatabaseTestCase
function testConstruct()
$db = $this->getConnection(false);
@ -6,6 +6,12 @@ use yii\db\Connection;
class ConnectionTest extends DatabaseTestCase
$connection = $this->getConnection(false);
@ -12,6 +12,7 @@ abstract class DatabaseTestCase extends TestCase
$databases = $this->getParam('databases');
$this->database = $databases[$this->driverName];
$pdo_database = 'pdo_'.$this->driverName;
@ -11,6 +11,11 @@ use yii\db\pgsql\QueryBuilder as PgsqlQueryBuilder;
class QueryBuilderTest extends DatabaseTestCase
/**
* @throws \Exception
class QueryTest extends DatabaseTestCase
function testSelect()
// default