• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CDbTestCase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: setUp

 /**
  *
  * @see test/CDbTestCase::setUp()
  */
 protected function setUp()
 {
     parent::setUp();
 }
开发者ID:honglei619,项目名称:simpleWorkflow,代码行数:8,代码来源:Event03ARTest.php


示例2: setUp

 protected function setUp()
 {
     parent::setUp();
     foreach ($this->fixtures as $key => $value) {
         Yii::app()->db->getSchema()->resetSequence(Yii::app()->db->getSchema()->getTable($key));
     }
 }
开发者ID:kuzmina-mariya,项目名称:unizaro-kamin,代码行数:7,代码来源:EavSetTest.php


示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $this->cleanDirectories();
     require_once dirname(__FILE__) . '/../../../commands/ImportLegacyVFCommand.php';
     $this->archiveDir = sys_get_temp_dir() . '/openeyes_vis_fields_tmp_archive';
     $this->errorDir = sys_get_temp_dir() . '/openeyes_vis_fields_tmp_error';
     $this->dupDir = sys_get_temp_dir() . '/openeyes_vis_fields_tmp_dups';
     $this->importDir = sys_get_temp_dir() . '/openeyes_vis_fields_tmp_in';
     $this->originalImportDir = dirname(__FILE__) . '/../../fields/legacy';
     if (!file_exists($this->archiveDir)) {
         mkdir($this->archiveDir, 0777, true);
     }
     if (!file_exists($this->errorDir)) {
         mkdir($this->errorDir, 0777, true);
     }
     if (!file_exists($this->dupDir)) {
         mkdir($this->dupDir, 0777, true);
     }
     if (!file_exists($this->importDir)) {
         mkdir($this->importDir, 0777, true);
     }
     $CCRunner = new CConsoleCommandRunner();
     // test needs to make sure all new files that come in look like new
     // file names (unique, based on time), otherwise there will be errors:
     foreach (glob($this->originalImportDir . '/*.fmes') as $file) {
         $this->prepareFile($file);
     }
     $this->legacyFieldCommand = new ImportLegacyVFCommand('LegacyFields', $CCRunner);
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:30,代码来源:LegacyFieldsCommandTest.php


示例4: setUp

 public function setUp()
 {
     parent::setUp();
     $this->oeMigration = new OEMigration();
     $this->oeMigration->setVerbose(false);
     $this->fixturePath = Yii::getPathOfAlias('application.tests.fixtures');
 }
开发者ID:openeyeswales,项目名称:OpenEyes,代码行数:7,代码来源:OEMigrationTest.php


示例5: setUp

 public function setUp()
 {
     $this->getFixtureManager()->resetTable('article');
     $this->getFixtureManager()->loadFixture('article');
     exec('./setup.sh');
     parent::setUp();
 }
开发者ID:sergebezborodov,项目名称:sphinx-yii,代码行数:7,代码来源:ApiSearchTest.php


示例6: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->model = new Contact();
     //setup attributes to test with = contacts1
     $this->model->setAttributes($this->contacts('contact1')->getAttributes());
 }
开发者ID:code-4-england,项目名称:OpenEyes,代码行数:11,代码来源:ContactTest.php


示例7: tearDown

 public function tearDown()
 {
     parent::tearDown();
     if (file_exists($this->_fileName)) {
         unlink($this->_fileName);
     }
 }
开发者ID:xyzz,项目名称:CrashFix,代码行数:7,代码来源:CrashReportTest.php


示例8: setUp

 public function setUp()
 {
     $this->getFixtureManager()->resetTable('order');
     $this->getFixtureManager()->loadFixture('order');
     CActiveRecord::$db = $this->db = Yii::app()->db;
     parent::setUp();
 }
开发者ID:dutchakdev,项目名称:yii-batch,代码行数:7,代码来源:BatchTest.php


示例9: setUp

 protected function setUp()
 {
     $component = Yii::createComponent(array('class' => 'application.extensions.simpleWorkflow.SWPhpWorkflowSource', 'basePath' => 'application.tests.unit.task.workflows'));
     Yii::app()->setComponent('swSource', $component);
     Task_2_Test::$task2 = null;
     parent::setUp();
 }
开发者ID:honglei619,项目名称:simpleWorkflow,代码行数:7,代码来源:Task_2_Test.php


示例10: setUp

 protected function setUp()
 {
     parent::setUp();
     Yii::app()->cache->flush();
     RuntimeCache::$data = array();
     $this->becomeUser('User1');
 }
开发者ID:skapl,项目名称:design,代码行数:7,代码来源:HDbTestCase.php


示例11: tearDown

 public function tearDown()
 {
     parent::tearDown();
     // Remove created temp files.
     $filePattern = Yii::app()->getRuntimePath() . "/aop*.tmp";
     foreach (glob($filePattern) as $filename) {
         unlink($filename);
     }
 }
开发者ID:xyzz,项目名称:CrashFix,代码行数:9,代码来源:PollCommandTest.php


示例12: setUp

 public function setUp()
 {
     parent::setUp();
     $module = new BaseEventTypeModule('OphTrOperationbooking', null);
     $this->controller = $this->getMockBuilder('_WrapperBookingController')->setConstructorArgs(array('_WrapperBookingController', $module))->setMethods(array('redirect', 'processJsVars'))->getMock();
     $this->audit = $this->getMockBuilder('Audit')->disableOriginalConstructor()->getMock();
     Yii::app()->session['selected_firm_id'] = 1;
     $this->controller->firm = Firm::model()->findByPk(1);
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:9,代码来源:BookingControllerTest.php


示例13: tearDown

 public function tearDown()
 {
     parent::tearDown();
     @unlink($this->_fileName);
     // Get parent directory names
     $dirName = dirname($this->_fileName);
     $outerDirName = dirname($dirName);
     @rmdir($dirName);
     @rmdir($outerDirName);
 }
开发者ID:xyzz,项目名称:CrashFix,代码行数:10,代码来源:BugAttachmentTest.php


示例14: tearDown

 protected function tearDown()
 {
     //        /*delete all productOrders*/
     ProductOrders::model()->deleteAll();
     /*delete all products*/
     Product::model()->deleteAll();
     /*delete all orders*/
     Orders::model()->deleteAll();
     parent::tearDown();
 }
开发者ID:kevindaus,项目名称:Order-Billing-Inventory-System-Marcials-Furniture,代码行数:10,代码来源:WeeklySalesReportTest.php


示例15: tearDown

 public function tearDown()
 {
     parent::tearDown();
     Yii::app()->setModules($this->orig_modules);
     Yii::setPathOfAlias('ModuleAPITestNS', null);
     Yii::setPathOfAlias('application.modules.TestModule.components', null);
     if ($this->test_event_type) {
         $this->test_event_type->noVersion()->delete();
     }
 }
开发者ID:code-4-england,项目名称:OpenEyes,代码行数:10,代码来源:ModuleAPITest.php


示例16: setup

 function setup()
 {
     parent::setUp();
     $_POST['Photo']['album_id'] = 1;
     $_POST['Photo']['filename'] = "IMG_1234.jpg";
     $_POST['Photo']['caption'] = "This is a photo caption";
     $_POST['Photo']['alt_text'] = "This is some alt text";
     $_POST['Photo']['tags'] = "Tag1,Tag2,Tag3";
     $_POST['Photo']['sort_order'] = 1;
 }
开发者ID:sgaraba,项目名称:photo_gallery,代码行数:10,代码来源:PhotoTest.php


示例17: setUp

 protected function setUp()
 {
     parent::setUp();
     //return;
     Yii::app()->db->createCommand("TRUNCATE `contactattr`")->query();
     Yii::app()->db->createCommand("INSERT INTO `contactattr`(`entity`, `attribute`, `value`) VALUES ('1', 'phone', '+373 1');")->query();
     Yii::app()->db->createCommand("INSERT INTO `contactattr`(`entity`, `attribute`, `value`) VALUES ('1', 'phone', '+373 2');")->query();
     Yii::app()->db->createCommand("INSERT INTO `contactattr`(`entity`, `attribute`, `value`) VALUES ('1', 'skype', 'SlavaSkype');")->query();
     Yii::app()->db->createCommand("INSERT INTO `contactattr`(`entity`, `attribute`, `value`) VALUES ('2', 'skype', 'AlexandrSkype');")->query();
 }
开发者ID:sinelnikof,项目名称:yiiext,代码行数:10,代码来源:EavTest.php


示例18: setUp

 protected function setUp()
 {
     parent::setUp();
     Materia::model()->deleteAll();
     $this->usuario1 = new Usuario();
     $this->usuario1->setAttributes(['pnome' => 'Fulano', 'snome' => 'De Tal', 'email' => '[email protected]', 'senha' => '123456', 'senha_confirma' => '123456', 'dt_criacao' => date('Y-m-d H:i:s'), 'situacao' => Usuario::SIT_ATIVO], false);
     $this->usuario1->save(false);
     $this->usuario2 = new Usuario();
     $this->usuario2->setAttributes(['pnome' => 'Ciclano', 'snome' => 'De Tal', 'email' => '[email protected]', 'senha' => '123456', 'senha_confirma' => '123456', 'dt_criacao' => date('Y-m-d H:i:s'), 'situacao' => Usuario::SIT_ATIVO], false);
     $this->usuario2->save(false);
 }
开发者ID:jralison,项目名称:chrono,代码行数:11,代码来源:MateriaTest.php


示例19: setUp

 protected function setUp()
 {
     parent::setUp();
     Topico::model()->deleteAll();
     $this->usuario = new Usuario();
     $this->usuario->setAttributes(['pnome' => 'Fulano', 'snome' => 'De Tal', 'email' => '[email protected]', 'senha' => '123456', 'senha_confirma' => '123456', 'dt_criacao' => date('Y-m-d H:i:s'), 'situacao' => Usuario::SIT_ATIVO], false);
     $this->usuario->save(false);
     $this->materia = new Materia();
     $this->materia->setAttributes(['usuario_id' => $this->usuario->id, 'titulo' => 'Matéria de Teste para Cadastrar Tópico', 'dt_criacao' => date('Y-m-d H:i:s')], false);
     $this->materia->save(false);
 }
开发者ID:jralison,项目名称:chrono,代码行数:11,代码来源:TopicoTest.php


示例20: tearDown

 /**
  * Tears down the fixture, for example, closes a network connection.
  * This method is called after a test is executed.
  */
 protected function tearDown()
 {
     parent::tearDown();
 }
开发者ID:openeyeswales,项目名称:OpenEyes,代码行数:8,代码来源:EventTypeTest.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP CDiskQuota类代码示例发布时间:2022-05-23
下一篇:
PHP CDbCriteria类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap