Skip to content

Commit

Permalink
Avoid Accessing static property ThinkUpTestDatabaseHelper:: as non st…
Browse files Browse the repository at this point in the history
…atic message in E_STRICT mode
  • Loading branch information
ginatrapani committed Feb 26, 2012
1 parent 55001ab commit a110d5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tests/TestOfDAOFactory.php
Expand Up @@ -51,8 +51,8 @@ protected function buildData() {
'test_id int(11),' . 'test_id int(11),' .
'unique key test_id_idx (test_id)' . 'unique key test_id_idx (test_id)' .
')'; ')';
if ($this->testdb_helper->prefix != 'tu_') { if (ThinkUpTestDatabaseHelper::$prefix != 'tu_') {
$test_table_sql = str_replace('tu_', $this->testdb_helper->prefix, $test_table_sql); $test_table_sql = str_replace('tu_', ThinkUpTestDatabaseHelper::$prefix, $test_table_sql);
} }
$this->testdb_helper->runSQL($test_table_sql); $this->testdb_helper->runSQL($test_table_sql);


Expand Down Expand Up @@ -190,7 +190,7 @@ public function testGetOwnerDAO(){
public function testGetOwnerDAONoConfigFile(){ public function testGetOwnerDAONoConfigFile(){
$this->removeConfigFile(); $this->removeConfigFile();
Config::destroyInstance(); 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); $config = Config::getInstance($cfg_values);
$dao = DAOFactory::getDAO('OwnerDAO', $cfg_values); $dao = DAOFactory::getDAO('OwnerDAO', $cfg_values);
$this->assertTrue(isset($dao)); $this->assertTrue(isset($dao));
Expand Down Expand Up @@ -381,7 +381,7 @@ public function testGetShortLinkDAO() {
public function testGetInstallerDAONoConfigFile(){ public function testGetInstallerDAONoConfigFile(){
$this->removeConfigFile(); $this->removeConfigFile();
Config::destroyInstance(); 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); $config = Config::getInstance($cfg_values);
$dao = DAOFactory::getDAO('InstallerDAO', $cfg_values); $dao = DAOFactory::getDAO('InstallerDAO', $cfg_values);
$this->assertTrue(isset($dao)); $this->assertTrue(isset($dao));
Expand Down
1 change: 0 additions & 1 deletion tests/classes/class.ThinkUpUnitTestCase.php
Expand Up @@ -63,7 +63,6 @@ public function setUp() {
$this->testdb_helper = new ThinkUpTestDatabaseHelper(); $this->testdb_helper = new ThinkUpTestDatabaseHelper();
$this->testdb_helper->drop($this->test_database_name); $this->testdb_helper->drop($this->test_database_name);
$this->table_prefix = $config->getValue('table_prefix'); $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"); $this->testdb_helper->create($THINKUP_CFG['source_root_path']."/webapp/install/sql/build-db_mysql.sql");
} }


Expand Down

0 comments on commit a110d5f

Please sign in to comment.