Esempio n. 1
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function setup()
 {
     // remove "Test_" prefix
     $this->_class = substr(get_class($this), 5);
     $this->_access = Solar::factory($this->_class, $this->_config);
     parent::setup();
 }
Esempio n. 2
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function setup()
 {
     parent::setup();
     // var dumpers
     $this->_text = Solar::factory('Solar_Debug_Var', array('output' => 'text'));
     $this->_html = Solar::factory('Solar_Debug_Var', array('output' => 'html'));
 }
Esempio n. 3
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function setup()
 {
     parent::setup();
     // remove "Test_" prefix
     $this->_class = substr(get_class($this), 5);
     // get the request environment
     $this->_request = Solar_Registry::get('request');
     // get a new adapter
     $this->_auth = Solar::factory($this->_class, $this->_config);
 }
Esempio n. 4
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function setup()
 {
     parent::setup();
     // set up an SQL connection
     $this->_sql = Solar::factory('Solar_Sql', $this->_sql_config);
     // set up a model catalog
     $this->_catalog = Solar::factory('Solar_Sql_Model_Catalog', $this->_catalog_config);
     // register the connection and catalog
     Solar_Registry::set('sql', $this->_sql);
     Solar_Registry::set('model_catalog', $this->_catalog);
 }
Esempio n. 5
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function setup()
 {
     parent::setup();
     // when running from the command line, these elements are empty.
     // fake them so that web-like testing can occur.
     $_SERVER['HTTP_HOST'] = 'example.com';
     $_SERVER['SCRIPT_NAME'] = '/path/to/index.php';
     $_SERVER['PATH_INFO'] = '/appname/action';
     $_SERVER['QUERY_STRING'] = 'foo=bar&baz=dib';
     $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO'] . '?' . $_SERVER['QUERY_STRING'];
 }
Esempio n. 6
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function setup()
 {
     parent::setup();
     // set up an SQL connection
     $this->_sql = Solar::factory('Solar_Sql', $this->_sql_config);
     $this->_sql->setProfiling(true);
     // set up a model catalog
     $this->_catalog = Solar::factory('Solar_Sql_Model_Catalog', $this->_catalog_config);
     // register the connection and catalog
     Solar_Registry::set('sql', $this->_sql);
     Solar_Registry::set('model_catalog', $this->_catalog);
     // populate everything
     $this->_populateAll();
 }
Esempio n. 7
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function setup()
 {
     parent::setup();
     // set up an SQL connection
     $this->_sql = Solar::factory('Solar_Sql', $this->_sql_config);
     $this->_sql->setProfiling(true);
     // set up a model catalog
     $this->_catalog = Solar::factory('Solar_Sql_Model_Catalog', $this->_catalog_config);
     // register the connection and catalog
     Solar_Registry::set('sql', $this->_sql);
     Solar_Registry::set('model_catalog', $this->_catalog);
     // set the class name for relateds
     $len = strlen('Test_');
     $this->_class = substr(get_class($this), $len);
     // populate everything
     $this->_populateAll();
 }
Esempio n. 8
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function setup()
 {
     parent::setup();
     $this->_adapter = Solar::factory($this->_adapter_class, $this->_config);
     // drop existing table
     try {
         $this->_adapter->dropTable($this->_table_name);
     } catch (Exception $e) {
         // do nothing
     }
     // drop existing sequence
     try {
         $this->_adapter->dropSequence($this->_seq_name);
     } catch (Exception $e) {
         // do nothing
     }
     // recreate table
     $this->_adapter->createTable($this->_table_name, $this->_table_def);
 }
Esempio n. 9
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function setup()
 {
     parent::setup();
 }
Esempio n. 10
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function setup()
 {
     parent::setup();
     Solar_Registry::set('sql', 'Solar_Sql');
     Solar_Registry::set('model_catalog', 'Solar_Sql_Model_Catalog');
 }
Esempio n. 11
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function setup()
 {
     parent::setup();
     Solar_Registry::set('sql', 'Solar_Sql');
 }
Esempio n. 12
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function setup()
 {
     parent::setup();
     $this->_page = Solar::factory($this->_page_class);
 }
Esempio n. 13
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function setup()
 {
     parent::setup();
     $this->_session = Solar::factory('Solar_Session');
     $this->_session->setClass($this->_class);
 }
Esempio n. 14
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function setup()
 {
     parent::setup();
     $this->_adapter = Solar::factory($this->_adapter_class, $this->_config);
 }