public function setUp($connection_name = null)
 {
     if ($connection_name && !in_array($connection_name, PDO::getAvailableDrivers())) {
         $this->mark_test_skipped($connection_name . ' drivers are not present');
     }
     parent::setUp($connection_name);
 }
 public function setUp($connectionName = null)
 {
     if ($connectionName && !in_array($connectionName, PDO::getAvailableDrivers()) || ActiveRecord\Config::instance()->getConnection($connectionName) == 'skip') {
         $this->markTestSkipped($connectionName . ' drivers are not present');
     }
     parent::setUp($connectionName);
 }
 public function setUp($connectionName = null)
 {
     parent::setUp($connectionName);
     // ensure VenueCB model has been loaded
     VenueCB::find(1);
     $this->callback = new ActiveRecord\CallBack('VenueCB');
 }
 /**
  * initialite
  */
 public function setUp()
 {
     parent::setUp();
     $this->_model = new Project_Models_Project();
     $this->_tree = new Phprojekt_Tree_Node_Database($this->_model, 1);
     $this->_tree = $this->_tree->setup();
 }
Beispiel #5
0
 function setUp()
 {
     parent::setUp();
     $serial_string = serialize($this->db);
     unset($this->db);
     $this->db = unserialize($serial_string);
 }
 public function setUp($connectionName = null)
 {
     if (!extension_loaded('memcache')) {
         $this->markTestSkipped('The memcache extension is not available');
         return;
     }
     parent::setUp($connectionName);
     ActiveRecord\Config::instance()->setCache('memcache://localhost');
 }
 /**
  * setUp method for PHPUnit. We use a shared db connection
  */
 public function setUp()
 {
     parent::setUp();
     $this->_emptyResult = array();
     $this->_formResult = array('projectId' => array('id' => '', 'tableName' => '', 'tablefield' => '', 'formTab' => '', 'formLabel' => '', 'formType' => '', 'formPosition' => '', 'formColumns' => '', 'formRegexp' => '', 'formRange' => '', 'defaultValue' => '', 'listPosition' => '', 'listAlign' => '', 'listUseFilter' => '', 'altPosition' => '', 'status' => '', 'isInteger' => '', 'isRequired' => '', 'isUnique' => ''), 'title' => array('id' => '', 'tableName' => '', 'tablefield' => '', 'formTab' => '', 'formLabel' => '', 'formType' => '', 'formPosition' => '', 'formColumns' => '', 'formRegexp' => '', 'formRange' => '', 'defaultValue' => '', 'listPosition' => '', 'listAlign' => '', 'listUseFilter' => '', 'altPosition' => '', 'status' => '', 'isInteger' => '', 'isRequired' => '', 'isUnique' => ''), 'notes' => array('id' => '', 'tableName' => '', 'tablefield' => '', 'formTab' => '', 'formLabel' => '', 'formType' => '', 'formPosition' => '', 'formColumns' => '', 'formRegexp' => '', 'formRange' => '', 'defaultValue' => '', 'listPosition' => '', 'listAlign' => '', 'listUseFilter' => '', 'altPosition' => '', 'status' => '', 'isInteger' => '', 'isRequired' => '', 'isUnique' => ''), 'startDate' => array('id' => '', 'tableName' => '', 'tablefield' => '', 'formTab' => '', 'formLabel' => '', 'formType' => '', 'formPosition' => '', 'formColumns' => '', 'formRegexp' => '', 'formRange' => '', 'defaultValue' => '', 'listPosition' => '', 'listAlign' => '', 'listUseFilter' => '', 'altPosition' => '', 'status' => '', 'isInteger' => '', 'isRequired' => '', 'isUnique' => ''), 'endDate' => array('id' => '', 'tableName' => '', 'tablefield' => '', 'formTab' => '', 'formLabel' => '', 'formType' => '', 'formPosition' => '', 'formColumns' => '', 'formRegexp' => '', 'formRange' => '', 'defaultValue' => '', 'listPosition' => '', 'listAlign' => '', 'listUseFilter' => '', 'altPosition' => '', 'status' => '', 'isInteger' => '', 'isRequired' => '', 'isUnique' => ''), 'priority' => array('id' => '', 'tableName' => '', 'tablefield' => '', 'formTab' => '', 'formLabel' => '', 'formType' => '', 'formPosition' => '', 'formColumns' => '', 'formRegexp' => '', 'formRange' => '', 'defaultValue' => '', 'listPosition' => '', 'listAlign' => '', 'listUseFilter' => '', 'altPosition' => '', 'status' => '', 'isInteger' => '', 'isRequired' => '', 'isUnique' => ''), 'currentStatus' => array('id' => '', 'tableName' => '', 'tablefield' => '', 'formTab' => '', 'formLabel' => '', 'formType' => '', 'formPosition' => '', 'formColumns' => '', 'formRegexp' => '', 'formRange' => '', 'defaultValue' => '', 'listPosition' => '', 'listAlign' => '', 'listUseFilter' => '', 'altPosition' => '', 'status' => '', 'isInteger' => '', 'isRequired' => '', 'isUnique' => ''), 'completePercent' => array('id' => '', 'tableName' => '', 'tablefield' => '', 'formTab' => '', 'formLabel' => '', 'formType' => '', 'formPosition' => '', 'formColumns' => '', 'formRegexp' => '', 'formRange' => '', 'defaultValue' => '', 'listPosition' => '', 'listAlign' => '', 'listUseFilter' => '', 'altPosition' => '', 'status' => '', 'isInteger' => '', 'isRequired' => '', 'isUnique' => ''), 'budget' => array('id' => '', 'tableName' => '', 'tablefield' => '', 'formTab' => '', 'formLabel' => '', 'formType' => '', 'formPosition' => '', 'formColumns' => '', 'formRegexp' => '', 'formRange' => '', 'defaultValue' => '', 'listPosition' => '', 'listAlign' => '', 'listUseFilter' => '', 'altPosition' => '', 'status' => '', 'isInteger' => '', 'isRequired' => '', 'isUnique' => ''));
     $this->_listResult = array('title' => $this->_formResult['title'], 'startDate' => $this->_formResult['startDate'], 'endDate' => $this->_formResult['endDate'], 'priority' => $this->_formResult['priority'], 'currentStatus' => $this->_formResult['currentStatus'], 'completePercent' => $this->_formResult['completePercent']);
     $this->_filterResult = array('title' => $this->_formResult['title'], 'start_date' => $this->_formResult['startDate'], 'end_date' => $this->_formResult['endDate'], 'priority' => $this->_formResult['priority'], 'current_status' => $this->_formResult['currentStatus'], 'complete_percent' => $this->_formResult['completePercent']);
     $this->sharedFixture = Phprojekt::getInstance()->getDb();
 }
 /**
  * setUp method for PHPUnit. We use a shared db connection
  */
 public function setUp()
 {
     parent::setUp();
     $this->_emptyResult = array();
     $this->_formResult = array('title', 'notes', 'projectId', 'startDate', 'endDate', 'priority', 'currentStatus', 'completePercent', 'budget', 'contactId');
     $this->_formLabelResult = array('Title', 'Notes', 'Parent', 'Start date', 'End date', 'Priority', 'Current status', 'Complete percent', 'Budget', 'Contact');
     $this->_listResult = array('title', 'startDate', 'endDate', 'priority', 'currentStatus', 'completePercent');
     $this->_listLabelResult = array('Title', 'Start date', 'End date', 'Priority', 'Current status', 'Complete percent');
     $this->sharedFixture = Phprojekt::getInstance()->getDb();
 }
Beispiel #9
0
 public function setUp()
 {
     parent::setUp();
     $adapter = new \Cactus\Adapter\PDO($this->getConnection()->getConnection());
     $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'tasks' . DIRECTORY_SEPARATOR;
     $this->migrate = new \Cactus\Task\Migrate($path . 'migrations', $adapter);
     $this->seed = new \Cactus\Task\Seed($path . 'seed', $adapter);
     $this->adapter = $adapter;
     $this->migrate->migrate();
 }
 public function setUp($connectionName = null)
 {
     parent::setUp($connectionName);
     Event::$belongsTo = array(array('venue'), array('host'));
     Venue::$hasMany = array(array('events', 'order' => 'id asc'), array('hosts', 'through' => 'events', 'order' => 'hosts.id asc'));
     Venue::$hasOne = array();
     Employee::$hasOne = array(array('position'));
     Host::$hasMany = array(array('events', 'order' => 'id asc'));
     foreach ($this->relationshipNames as $name) {
         if (preg_match("/{$name}/i", $this->getName())) {
             $this->relationshipName = $name;
         }
     }
 }
Beispiel #11
0
 /**
  * setUp method for PHPUnit
  */
 public function setUp()
 {
     parent::setUp();
     $this->_model = new Timecard_Models_Timecard();
 }
 public function setUp($connectionName = null)
 {
     parent::setUp($connectionName);
     $this->sql = new SQLBuilder($this->conn, $this->tableName);
     $this->table = Table::load($this->className);
 }
 public function setUp($connectionName = null)
 {
     parent::setUp($connectionName);
     BookLength::$validatesLengthOf[0] = array('name', 'allowBlank' => false, 'allowNull' => false);
 }
Beispiel #14
0
 public function setUp()
 {
     parent::setUp();
     $this->pdo = new \Cactus\Adapter\PDO($this->pdo = $this->getConnection()->getConnection());
 }
 public function setUp($connectionName = null)
 {
     parent::setUp($connectionName);
     BookFormat::$validatesFormatOf[0] = array('name');
 }
 public function setUp($connectionName = null)
 {
     parent::setUp($connectionName);
     BookNumericality::$validatesNumericalityOf = array(array('numeric_test'));
 }
 public function setUp($connectionName = null)
 {
     parent::setUp($connectionName);
     BookInclusion::$validatesInclusionOf[0] = array('name', 'in' => array('blah', 'tanker', 'shark'));
     BookExclusion::$validatesExclusionOf[0] = array('name', 'in' => array('blah', 'alpha', 'bravo'));
 }
 public function setUp($connectionName = null)
 {
     parent::setUp($connectionName);
     BookValidations::$validatesPresenceOf[0] = 'name';
     BookValidations::$validatesUniquenessOf[0] = 'name';
 }
 public function setUp($connectionName = null)
 {
     parent::setUp($connectionName);
     $this->options = array('conditions' => 'blah', 'order' => 'blah');
 }
Beispiel #20
0
 public function setUp()
 {
     parent::setUp();
     $this->sharedFixture = Phprojekt::getInstance()->getDb();
 }
 public function setUp($connectionName = null)
 {
     parent::setUp($connectionName);
     $this->venue = new Venue();
     $this->callback = Venue::table()->callback;
 }