Permalink
Browse files

Avoid Accessing static property ThinkUpTestDatabaseHelper:: as non st…

…atic message in E_STRICT mode
  • Loading branch information...
1 parent 55001ab commit a110d5fea0fea14ee0a1d2998e67b7f93ad5a1da @ginatrapani ginatrapani committed Feb 26, 2012
Showing with 4 additions and 5 deletions.
  1. +4 −4 tests/TestOfDAOFactory.php
  2. +0 −1 tests/classes/class.ThinkUpUnitTestCase.php
@@ -51,8 +51,8 @@ protected function buildData() {
'test_id int(11),' .
'unique key test_id_idx (test_id)' .
')';
- if ($this->testdb_helper->prefix != 'tu_') {
- $test_table_sql = str_replace('tu_', $this->testdb_helper->prefix, $test_table_sql);
+ if (ThinkUpTestDatabaseHelper::$prefix != 'tu_') {
+ $test_table_sql = str_replace('tu_', ThinkUpTestDatabaseHelper::$prefix, $test_table_sql);
}
$this->testdb_helper->runSQL($test_table_sql);
@@ -190,7 +190,7 @@ public function testGetOwnerDAO(){
public function testGetOwnerDAONoConfigFile(){
$this->removeConfigFile();
Config::destroyInstance();
- $cfg_values = array("table_prefix"=>$this->testdb_helper->prefix, "db_host"=>"localhost");
+ $cfg_values = array("table_prefix"=>ThinkUpTestDatabaseHelper::$prefix, "db_host"=>"localhost");
$config = Config::getInstance($cfg_values);
$dao = DAOFactory::getDAO('OwnerDAO', $cfg_values);
$this->assertTrue(isset($dao));
@@ -381,7 +381,7 @@ public function testGetShortLinkDAO() {
public function testGetInstallerDAONoConfigFile(){
$this->removeConfigFile();
Config::destroyInstance();
- $cfg_values = array("table_prefix"=>$this->testdb_helper->prefix, "db_host"=>"localhost");
+ $cfg_values = array("table_prefix"=>ThinkUpTestDatabaseHelper::$prefix, "db_host"=>"localhost");
$config = Config::getInstance($cfg_values);
$dao = DAOFactory::getDAO('InstallerDAO', $cfg_values);
$this->assertTrue(isset($dao));
@@ -63,7 +63,6 @@ public function setUp() {
$this->testdb_helper = new ThinkUpTestDatabaseHelper();
$this->testdb_helper->drop($this->test_database_name);
$this->table_prefix = $config->getValue('table_prefix');
- $this->testdb_helper->prefix = $this->table_prefix;
$this->testdb_helper->create($THINKUP_CFG['source_root_path']."/webapp/install/sql/build-db_mysql.sql");
}

0 comments on commit a110d5f

Please sign in to comment.