當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。