作者:phpshk
项目:yii2-magic-scope
protected function runTest()
{
foreach ($this->classesWith as $className) {
$this->currentTestClass = $className;
parent::runTest();
}
}
作者:iw-reloa
项目:i
public function setUp()
{
parent::setUp();
/* @var $doctrine \common\components\doctrine\DoctrineComponent */
$doctrine = \Yii::$app->get('doctrine');
$this->em = $doctrine->getEntityManager();
}
作者:raoul200
项目:yii2-workflo
protected function setup()
{
parent::setUp();
Yii::$app->set('workflowSource', ['class' => 'raoul2000\\workflow\\source\\file\\WorkflowFileSource', 'definitionLoader' => ['class' => 'raoul2000\\workflow\\source\\file\\PhpClassLoader', 'namespace' => 'tests\\codeception\\unit\\models']]);
Yii::$app->set('status_accessor', ['class' => 'tests\\codeception\\unit\\models\\StatusAccessor07']);
$this->statusAccessor = Yii::$app->get('status_accessor');
$this->statusAccessor->resetCallCounters();
StatusAccessor07::$instanceCount = 1;
}
作者:fprojec
项目:workflowi
public function __get($name)
{
$getter = 'get' . $name;
if (method_exists($this, $getter)) {
return $this->{$getter}();
} else {
return parent::__get($name);
}
}
作者:fprojec
项目:workflowi
protected function setup()
{
parent::setUp();
Yii::$app->set('workflowFactory', ['class' => 'fproject\\workflow\\core\\ArrayWorkflowItemFactory', 'workflowSourceNamespace' => 'tests\\codeception\\unit\\models']);
Yii::$app->set('status_accessor', ['class' => 'tests\\codeception\\unit\\models\\StatusAccessor07']);
$this->statusAccessor = Yii::$app->get('status_accessor');
$this->statusAccessor->resetCallCounters();
StatusAccessor07::$instanceCount = 1;
}
作者:notamedi
项目:yii2-relatio
/** @inheritdoc */
protected function setUp()
{
parent::setUp();
$model = $model = new FakeNewsModel();
$model->name = 'News 1';
$model->file = ['src' => '/images/file.pdf'];
$model->images = [['src' => '/images/image1.png'], ['src' => '/images/image2.png']];
$model->save();
$this->model = $model;
}
作者:jumper42
项目:yii2-image
protected function setUp()
{
parent::setUp();
$config = ArrayHelper::merge(require Yii::getAlias($this->appConfig), ['components' => ['db' => ['class' => '\\yii\\db\\Connection', 'dsn' => 'sqlite::memory:']], 'modules' => ['jumper423Store' => ['class' => 'jumper423\\yii2images\\Module']]]);
$this->mockApplication($config);
$columns = ['id' => 'pk', 'name' => 'string'];
Yii::$app->getDb()->createCommand()->createTable('test_image_behavior', $columns)->execute();
$columns = ['id' => 'pk', 'filePath' => 'VARCHAR(400) NOT NULL', 'itemId' => 'int(20) NOT NULL', 'isMain' => 'int(1)', 'modelName' => 'VARCHAR(150) NOT NULL', 'urlAlias' => 'VARCHAR(400) NOT NULL'];
Yii::$app->getDb()->createCommand()->createTable('image', $columns)->execute();
/*vfsStream::setup('root');
vfsStream::setup('root/Cache');*/
$module = Yii::$app->getModule('jumper423Store');
//$module->imagesStorePath = vfsStream::url('root/Store');
//$module->imagesCachePath = vfsStream::url('root/Cache');
$module->imagesStorePath = Yii::getAlias('@app') . '/tests/unit/data/imgStore';
$module->imagesCachePath = Yii::getAlias('@app') . '/tests/unit/data/imgCache';
$this->model = new ActiveRecordImage();
$this->model->name = 'testName';
$this->model->save();
}
作者:fprojec
项目:workflowi
protected function setUp()
{
parent::setUp();
$this->src = new ArrayWorkflowItemFactory();
}
作者:gitksq
项目:yii2-app-modula
protected function tearDown()
{
Yii::$app->user->logout();
parent::tearDown();
}
作者:axiles8
项目:amo
/**
* @Override
*/
protected function _after()
{
parent::_after();
// TODO: Change the autogenerated stub
}
作者:kazachk
项目:photo-yii-sit
public function setUp()
{
parent::setUp();
$module = new Module(1);
}
作者:hipstercreativ
项目:yii2-user-mong
public function setUp()
{
parent::setUp();
$this->manager = new ModelManager();
}
作者:fprojec
项目:workflowi
protected function setup()
{
parent::setUp();
Yii::$app->set('wfIdAccessor', ['class' => 'tests\\codeception\\unit\\models\\IdAccessor09']);
}
作者:marley-ph
项目:linuxforu
public function setUp()
{
parent::setUp();
$this->model = new LoginForm(['scenario' => LoginForm::SCENARIO_DEFAULT]);
}
作者:yiiste
项目:yii2-mappable-a
protected function setUp()
{
Config::clearMap();
parent::setUp();
}
作者:highestgoodlikewate
项目:yii2-englishwordbook-dem
protected function setUp()
{
parent::setUp();
$this->loadFixtures(['user']);
}
作者:bazilio9
项目:yii2-bandi
protected function tearDown()
{
$this->redis->executeCommand('FLUSHDB');
parent::tearDown();
}
作者:raoul200
项目:yii2-workflo
protected function tearDown()
{
$this->model->delete();
parent::tearDown();
}
作者:sibd
项目:yii2-activerecor
public function tearDown()
{
Yii::$app->getDb()->createCommand()->delete('test_auto_timestamp')->execute();
Yii::$app->getDb()->close();
parent::tearDown();
}
作者:fprojec
项目:workflowi
protected function tearDown()
{
parent::tearDown();
}