当前位置: 首页>>代码示例>>PHP>>正文


PHP codeception\TestCase类代码示例

本文整理汇总了PHP中yii\codeception\TestCase的典型用法代码示例。如果您正苦于以下问题:PHP TestCase类的具体用法?PHP TestCase怎么用?PHP TestCase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了TestCase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: runTest

 protected function runTest()
 {
     foreach ($this->classesWith as $className) {
         $this->currentTestClass = $className;
         parent::runTest();
     }
 }
开发者ID:phpshko,项目名称:yii2-magic-scopes,代码行数:7,代码来源:TestCaseWrapper.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     /* @var $doctrine \common\components\doctrine\DoctrineComponent */
     $doctrine = \Yii::$app->get('doctrine');
     $this->em = $doctrine->getEntityManager();
 }
开发者ID:iw-reload,项目名称:iw,代码行数:7,代码来源:TestCase.php

示例3: setup

 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;
 }
开发者ID:raoul2000,项目名称:yii2-workflow,代码行数:9,代码来源:StatusAccessorTest.php

示例4: __get

 public function __get($name)
 {
     $getter = 'get' . $name;
     if (method_exists($this, $getter)) {
         return $this->{$getter}();
     } else {
         return parent::__get($name);
     }
 }
开发者ID:fproject,项目名称:workflowii,代码行数:9,代码来源:SimpleArrayDeserializerTest.php

示例5: setup

 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;
 }
开发者ID:fproject,项目名称:workflowii,代码行数:9,代码来源:StatusAccessorTest.php

示例6: setUp

 /** @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;
 }
开发者ID:notamedia,项目名称:yii2-relation,代码行数:11,代码来源:RelationBehaviorIntegrationTest.php

示例7: setUp

 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();
 }
开发者ID:jumper423,项目名称:yii2-images,代码行数:20,代码来源:ImageTest.php

示例8: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->src = new ArrayWorkflowItemFactory();
 }
开发者ID:fproject,项目名称:workflowii,代码行数:5,代码来源:TransitionTest.php

示例9: tearDown

 protected function tearDown()
 {
     Yii::$app->user->logout();
     parent::tearDown();
 }
开发者ID:gitksqc,项目名称:yii2-app-modular,代码行数:5,代码来源:LoginFormTest.php

示例10: _after

 /**
  * @Override
  */
 protected function _after()
 {
     parent::_after();
     // TODO: Change the autogenerated stub
 }
开发者ID:axiles89,项目名称:amop,代码行数:8,代码来源:DeleteProfilerListTest.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     $module = new Module(1);
 }
开发者ID:kazachka,项目名称:photo-yii-site,代码行数:5,代码来源:AdminTest.php

示例12: setUp

 public function setUp()
 {
     parent::setUp();
     $this->manager = new ModelManager();
 }
开发者ID:hipstercreative,项目名称:yii2-user-mongo,代码行数:5,代码来源:ModelManagerTest.php

示例13: setup

 protected function setup()
 {
     parent::setUp();
     Yii::$app->set('wfIdAccessor', ['class' => 'tests\\codeception\\unit\\models\\IdAccessor09']);
 }
开发者ID:fproject,项目名称:workflowii,代码行数:5,代码来源:AttachBehaviorTest.php

示例14: setUp

 public function setUp()
 {
     parent::setUp();
     $this->model = new LoginForm(['scenario' => LoginForm::SCENARIO_DEFAULT]);
 }
开发者ID:marley-php,项目名称:linuxforum,代码行数:5,代码来源:LoginFormTest.php

示例15: setUp

 protected function setUp()
 {
     Config::clearMap();
     parent::setUp();
 }
开发者ID:yiister,项目名称:yii2-mappable-ar,代码行数:5,代码来源:MappableARTest.php


注:本文中的yii\codeception\TestCase类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。