Example #1
0
 public function preTest()
 {
     parent::preTest();
     // var dumpers
     $this->_text = Solar::factory('Solar_Debug_Var', array('output' => 'text'));
     $this->_html = Solar::factory('Solar_Debug_Var', array('output' => 'html'));
 }
Example #2
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function preTest()
 {
     // remove "Test_" prefix
     $this->_class = substr(get_class($this), 5);
     $this->_access = Solar::factory($this->_class, $this->_config);
     parent::preTest();
 }
Example #3
0
 public function preTest()
 {
     parent::preTest();
     $this->_filter = Solar::factory('Solar_Filter');
     $this->_plugin = $this->_filter->getFilter($this->_plugin_name);
     $this->_filter->setRequire(true);
 }
Example #4
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function preTest()
 {
     parent::preTest();
     // 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);
 }
Example #5
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function preTest()
 {
     parent::preTest();
     // 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'];
 }
Example #6
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function preTest()
 {
     parent::preTest();
     // 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);
 }
Example #7
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function preTest()
 {
     parent::preTest();
     // 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();
 }
Example #8
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function preTest()
 {
     parent::preTest();
     // 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);
     // fixture to populate tables
     $this->_fixture = Solar::factory('Fixture_Solar_Sql_Model');
 }
Example #9
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function preTest()
 {
     parent::preTest();
     // 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();
 }
Example #10
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function preTest()
 {
     parent::preTest();
     // 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);
     // fixture to populate tables
     $this->_fixture = Solar::factory('Fixture_Solar_Sql_Model');
     $this->_fixture->setup();
     // preload all models to get discovery out of the way
     $this->_catalog->users;
     $this->_catalog->prefs;
     $this->_catalog->areas;
     $this->_catalog->nodes;
     $this->_catalog->metas;
     $this->_catalog->tags;
     $this->_catalog->taggings;
     $this->_catalog->comments;
     $this->_sql->setProfiling(true);
 }
Example #11
0
 /**
  * 
  * Teardown; runs after each test method.
  * 
  */
 public function teardown()
 {
     parent::teardown();
 }
Example #12
0
 protected function _postConstruct()
 {
     parent::_postConstruct();
     $this->_support_path = Solar_Class::dir('Mock_Solar_Path_Stack');
 }
Example #13
0
 /**
  * 
  * Creates an adapter instance.
  * 
  * @return void
  * 
  */
 public function preTest()
 {
     parent::preTest();
     $this->_adapter = Solar::factory($this->_adapter_class, $this->_config);
 }
Example #14
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function preTest()
 {
     parent::preTest();
     Solar_Registry::set('sql', 'Solar_Sql');
 }
Example #15
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function preTest()
 {
     parent::preTest();
     $this->_page = Solar::factory($this->_page_class);
 }
Example #16
0
 public function setup()
 {
     parent::setup();
     Solar_Registry::set('sql', 'Solar_Sql');
     Solar_Registry::set('model_catalog', 'Solar_Sql_Model_Catalog');
 }
Example #17
0
 /**
  * 
  * Setup; runs before each test method.
  * 
  */
 public function preTest()
 {
     parent::preTest();
     $this->_session = Solar::factory('Solar_Session');
     $this->_session->setClass($this->_class);
 }
Example #18
0
 /**
  * 
  * Setup; runs after each test method.
  * 
  */
 public function postTest()
 {
     $this->_adapter = null;
     parent::postTest();
 }
Example #19
0
 /**
  * 
  * Setup; runs after each test method.
  * 
  */
 public function teardown()
 {
     $this->_adapter = null;
     parent::teardown();
 }
Example #20
0
 public function preTest()
 {
     parent::preTest();
     $this->_helper = $this->_view->getHelper($this->_helper_name);
 }
Example #21
0
 public function preTest()
 {
     parent::preTest();
     $this->_markdown = Solar::factory('Solar_Markdown_Wiki');
 }
Example #22
0
 /**
  * 
  * Constructor.
  * 
  * @param array $config User-defined configuration parameters.
  * 
  */
 public function __construct($config = null)
 {
     $this->skip('abstract class');
     parent::__construct($config);
 }