本文整理汇总了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);
}
示例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');
}
示例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';
}
示例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');
}
示例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];
}
}
}
示例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);
}
示例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);
}
示例8: set_up
public function set_up($connection_name = null)
{
parent::set_up($connection_name);
BookNumericality::$validates_numericality_of = array(array('numeric_test'));
}
示例9: set_up
public function set_up($connection_name = null)
{
parent::set_up($connection_name);
BookValidations::$validates_uniqueness_of[0] = array('name');
}
示例10: set_up
public function set_up($connection_name = null)
{
parent::set_up($connection_name);
$this->options = array('conditions' => 'blah', 'order' => 'blah');
}
示例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'));
}
示例12: set_up
public function set_up($connection_name = null)
{
parent::set_up($connection_name);
$this->venue = new Venue();
$this->callback = Venue::table()->callback;
}
示例13: set_up
public function set_up($connection_name = null)
{
parent::set_up($connection_name);
BookFormat::$validates_format_of[0] = array('name');
}
示例14: set_up
public function set_up($connection_name = null)
{
parent::set_up($connection_name);
ActiveRecord\Config::instance()->set_cache('memcache://localhost');
}
示例15: set_up
public function set_up($connection_name = null)
{
parent::set_up($connection_name);
$this->sql = new SQLBuilder($this->conn, 'authors');
}