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


PHP DatabaseTest::set_up方法代码示例

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


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

示例1: set_up

 public function set_up($connection_name = null)
 {
     if ($connection_name && !in_array($connection_name, PDO::getAvailableDrivers()) || ActiveRecord\Config::instance()->get_connection($connection_name) == 'skip') {
         $this->mark_test_skipped($connection_name . ' drivers are not present');
     }
     parent::set_up($connection_name);
 }
开发者ID:visavi,项目名称:phpactiverecord,代码行数:7,代码来源:AdapterTest.php

示例2: set_up

 public function set_up($connection_name = null)
 {
     parent::set_up($connection_name);
     // ensure VenueCB model has been loaded
     VenueCB::find(1);
     $this->callback = new ActiveRecord\CallBack('VenueCB');
 }
开发者ID:jhonleandres,项目名称:batata,代码行数:7,代码来源:CallbackTest.php

示例3: set_up

 public function set_up($connection_name = null)
 {
     parent::set_up($connection_name);
     BookValidations::$validates_presence_of[0] = 'name';
     BookValidations::$validates_uniqueness_of[0] = 'name';
     ValuestoreValidations::$validates_uniqueness_of[0] = 'key';
 }
开发者ID:visavi,项目名称:phpactiverecord,代码行数:7,代码来源:ValidationsTest.php

示例4: set_up

 public function set_up($connection_name = null)
 {
     if (!extension_loaded('memcache')) {
         $this->markTestSkipped('The memcache extension is not available');
         return;
     }
     parent::set_up($connection_name);
     ActiveRecord\Config::instance()->set_cache('memcache://localhost');
 }
开发者ID:nehulyadav,项目名称:php-activerecord,代码行数:9,代码来源:CacheModelTest.php

示例5: set_up

 public function set_up($connection_name = null)
 {
     parent::set_up($connection_name);
     Event::$belongs_to = array(array('venue'), array('host'));
     Venue::$has_many = array(array('events', 'order' => 'id asc'), array('hosts', 'through' => 'events', 'order' => 'hosts.id asc'));
     Venue::$has_one = array();
     Employee::$has_one = array(array('position'));
     Host::$has_many = array(array('events', 'order' => 'id asc'));
     foreach ($this->relationship_names as $name) {
         if (preg_match("/{$name}/", $this->getName(), $match)) {
             $this->relationship_name = $match[0];
         }
     }
 }
开发者ID:Arunkumarcs,项目名称:Themis-Reinitialize,代码行数:14,代码来源:RelationshipTest.php

示例6: set_up

 public function set_up($connection_name = null)
 {
     parent::set_up($connection_name);
     BookLength::$validates_length_of[0] = array('name', 'allow_blank' => false, 'allow_null' => false);
 }
开发者ID:Arunkumarcs,项目名称:Themis-Reinitialize,代码行数:5,代码来源:ValidatesLengthOfTest.php

示例7: set_up

 public function set_up($connection_name = null)
 {
     parent::set_up($connection_name);
     $this->sql = new SQLBuilder($this->conn, $this->table_name);
     $this->table = Table::load($this->class_name);
 }
开发者ID:jhonleandres,项目名称:batata,代码行数:6,代码来源:SQLBuilderTest.php

示例8: set_up

 public function set_up($connection_name = null)
 {
     parent::set_up($connection_name);
     BookNumericality::$validates_numericality_of = array(array('numeric_test'));
 }
开发者ID:rvp2014,项目名称:php-activerecord,代码行数:5,代码来源:ValidatesNumericalityOfTest.php

示例9: set_up

 public function set_up($connection_name = null)
 {
     parent::set_up($connection_name);
     BookValidations::$validates_uniqueness_of[0] = array('name');
 }
开发者ID:signalrunner,项目名称:php-activerecord,代码行数:5,代码来源:ValidationsTest.php

示例10: set_up

 public function set_up($connection_name = null)
 {
     parent::set_up($connection_name);
     $this->options = array('conditions' => 'blah', 'order' => 'blah');
 }
开发者ID:sebcode,项目名称:php-activerecord,代码行数:5,代码来源:ActiveRecordTest.php

示例11: set_up

 public function set_up($connection_name = null)
 {
     parent::set_up($connection_name);
     BookInclusion::$validates_inclusion_of[0] = array('name', 'in' => array('blah', 'tanker', 'shark'));
     BookExclusion::$validates_exclusion_of[0] = array('name', 'in' => array('blah', 'alpha', 'bravo'));
 }
开发者ID:Clon450,项目名称:batata,代码行数:6,代码来源:ValidatesInclusionAndExclusionOfTest.php

示例12: set_up

 public function set_up($connection_name = null)
 {
     parent::set_up($connection_name);
     $this->venue = new Venue();
     $this->callback = Venue::table()->callback;
 }
开发者ID:rvp2014,项目名称:php-activerecord,代码行数:6,代码来源:ModelCallbackTest.php

示例13: set_up

 public function set_up($connection_name = null)
 {
     parent::set_up($connection_name);
     BookFormat::$validates_format_of[0] = array('name');
 }
开发者ID:visavi,项目名称:phpactiverecord,代码行数:5,代码来源:ValidatesFormatOfTest.php

示例14: set_up

 public function set_up($connection_name = null)
 {
     parent::set_up($connection_name);
     ActiveRecord\Config::instance()->set_cache('memcache://localhost');
 }
开发者ID:killich,项目名称:JustFrame,代码行数:5,代码来源:ActiveRecordCacheTest.php

示例15: set_up

 public function set_up($connection_name = null)
 {
     parent::set_up($connection_name);
     $this->sql = new SQLBuilder($this->conn, 'authors');
 }
开发者ID:scorplev,项目名称:php-activerecord,代码行数:5,代码来源:SQLBuilderTest.php


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