Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Avoid Accessing static property ThinkUpTestDatabaseHelper:: as non st…

…atic message in E_STRICT mode
  • Loading branch information...
commit a110d5fea0fea14ee0a1d2998e67b7f93ad5a1da 1 parent 55001ab
@ginatrapani ginatrapani authored
View
8 tests/TestOfDAOFactory.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));
View
1  tests/classes/class.ThinkUpUnitTestCase.php
@@ -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");
}
Please sign in to comment.
Something went wrong with that request. Please try again.