Browse files

[DB MIGRATION REQ'D] Issue #445: Drop deprecated tu_options table

* Closes #445, Closes #537
  • Loading branch information...
1 parent e28933b commit e90a1bcec0af8eac1c3a7f95abe199f10c526774 @mwilkie mwilkie committed with ginatrapani Jan 2, 2011
View
2 tests/TestOfBackupController.php
@@ -172,7 +172,7 @@ public function testResore() {
$dao = new BackupMySQLDAO();
$export_file = $dao->export();
- $this->pdo->query("drop table tu_plugin_options");
+ $this->pdo->query("drop table tu_plugins");
$this->simulateLogin('me@example.com', true);
View
2 tests/TestOfBackupMySQLDAO.php
@@ -128,7 +128,7 @@ public function testImportDataBadFile2() {
public function testImportData() {
$dao = new BackupMySQLDAO();
$export_file = $dao->export();
- $this->pdo->query("drop table tu_plugin_options");
+ //$this->pdo->query("drop table tu_plugin_options");
$this->assertTrue( $dao->import($export_file) );
$stmt = $this->pdo->query("show create table tu_plugins");
$data = $stmt->fetch();
View
2 tests/TestOfDAOFactory.php
@@ -281,7 +281,7 @@ public function testGetInstallerDAONoConfigFile(){
$this->assertTrue(isset($dao));
$this->assertIsA($dao, 'InstallerMySQLDAO');
$result = $dao->getTables();
- $this->assertEqual(sizeof($result), 16);
+ $this->assertEqual(sizeof($result), 15);
$this->assertEqual($result[0], $cfg_values["table_prefix"].'encoded_locations');
$this->restoreConfigFile();
}
View
36 tests/TestOfInstaller.php
@@ -137,8 +137,7 @@ public function testInstallerShowTables() {
$q = "DROP TABLE ".$config->getValue('table_prefix')."encoded_locations, ".
$config->getValue('table_prefix')."follower_count, ".$config->getValue('table_prefix').
"instances, ".$config->getValue('table_prefix')."owner_instances, ".$config->getValue('table_prefix').
- "owners, ".$config->getValue('table_prefix')."plugin_options,
- ".$config->getValue('table_prefix')."plugins, ".$config->getValue('table_prefix')."post_errors, ".
+ "owners, ".$config->getValue('table_prefix')."plugins, ".$config->getValue('table_prefix')."post_errors, ".
$config->getValue('table_prefix')."posts, ".$config->getValue('table_prefix')."user_errors, ".
$config->getValue('table_prefix')."favorites, ".
$config->getValue('table_prefix')."users,".$config->getValue('table_prefix')."options";
@@ -193,8 +192,7 @@ public function testInstallerCheckTable() {
$q = "DROP TABLE ".$config->getValue('table_prefix')."encoded_locations, ".
$config->getValue('table_prefix')."follower_count, ".$config->getValue('table_prefix').
"instances, ".$config->getValue('table_prefix')."owner_instances, ".$config->getValue('table_prefix').
- "owners, ".$config->getValue('table_prefix')."plugin_options,
- ".$config->getValue('table_prefix')."plugins, ".$config->getValue('table_prefix')."post_errors, ".
+ "owners, ".$config->getValue('table_prefix')."plugins, ".$config->getValue('table_prefix')."post_errors, ".
$config->getValue('table_prefix')."posts, ".$config->getValue('table_prefix')."user_errors, ".
$config->getValue('table_prefix')."favorites, ".
$config->getValue('table_prefix')."users," . $config->getValue('table_prefix')."options";
@@ -241,8 +239,7 @@ public function testDoThinkUpTablesExist() {
$q = "DROP TABLE ".$config->getValue('table_prefix')."encoded_locations, ".
$config->getValue('table_prefix')."follower_count, ".$config->getValue('table_prefix').
"instances, ".$config->getValue('table_prefix')."owner_instances, ".$config->getValue('table_prefix').
- "owners, ".$config->getValue('table_prefix')."plugin_options,
- ".$config->getValue('table_prefix')."plugins, ".$config->getValue('table_prefix')."post_errors, ".
+ "owners, ".$config->getValue('table_prefix')."plugins, ".$config->getValue('table_prefix')."post_errors, ".
$config->getValue('table_prefix')."posts, ".$config->getValue('table_prefix')."user_errors, ".
$config->getValue('table_prefix')."users," . $config->getValue('table_prefix')."options";
PDODAO::$PDO->exec($q);
@@ -287,11 +284,10 @@ public function testInstallerPopulateTables() {
$dao = new InstallerMySQLDAO($config_array);
$q = "DROP TABLE ".$config->getValue('table_prefix')."encoded_locations, ".
$config->getValue('table_prefix')."follower_count, ".$config->getValue('table_prefix')."instances, ".
- $config->getValue('table_prefix')."owner_instances, ".$config->getValue('table_prefix')."plugin_options, ".
- $config->getValue('table_prefix')."plugins, ".$config->getValue('table_prefix')."post_errors, ".
- $config->getValue('table_prefix')."posts, ".$config->getValue('table_prefix')."user_errors, ".
- $config->getValue('table_prefix')."users, ".$config->getValue('table_prefix')."follows, ".
- $config->getValue('table_prefix')."favorites, ".
+ $config->getValue('table_prefix')."owner_instances, ".$config->getValue('table_prefix')."plugins, " .
+ $config->getValue('table_prefix')."post_errors, ". $config->getValue('table_prefix')."posts, " .
+ $config->getValue('table_prefix')."user_errors, ". $config->getValue('table_prefix')."users, ".
+ $config->getValue('table_prefix')."follows, ".$config->getValue('table_prefix')."favorites, ".
$config->getValue('table_prefix')."links," . $config->getValue('table_prefix')."options";
PDODAO::$PDO->exec($q);
@@ -310,11 +306,10 @@ public function testInstallerPopulateTables() {
$dao = new InstallerMySQLDAO($config_array);
$q = "DROP TABLE ".$config->getValue('table_prefix')."encoded_locations, ".
$config->getValue('table_prefix')."follower_count, ".$config->getValue('table_prefix')."instances, ".
- $config->getValue('table_prefix')."owner_instances, ".$config->getValue('table_prefix')."plugin_options, ".
- $config->getValue('table_prefix')."plugins, ".$config->getValue('table_prefix')."post_errors, ".
- $config->getValue('table_prefix')."posts, ".$config->getValue('table_prefix')."user_errors, ".
- $config->getValue('table_prefix')."users, ".$config->getValue('table_prefix')."follows, ".
- $config->getValue('table_prefix')."favorites, ".
+ $config->getValue('table_prefix')."owner_instances, ".$config->getValue('table_prefix')."plugins, ".
+ $config->getValue('table_prefix')."post_errors, ".$config->getValue('table_prefix')."posts, ".
+ $config->getValue('table_prefix')."user_errors, ".$config->getValue('table_prefix')."users, ".
+ $config->getValue('table_prefix')."follows, ".$config->getValue('table_prefix')."favorites, ".
$config->getValue('table_prefix')."links, ".$config->getValue('table_prefix')."owners," .
$config->getValue('table_prefix')."options";
@@ -334,10 +329,9 @@ public function testInstallerPopulateTables() {
$q = "DROP TABLE ".$config->getValue('table_prefix')."encoded_locations, ".
$config->getValue('table_prefix')."follower_count, ".$config->getValue('table_prefix')."instances, ".
$config->getValue('table_prefix')."owner_instances, ".$config->getValue('table_prefix')."owners, ".
- $config->getValue('table_prefix')."plugin_options, ".$config->getValue('table_prefix')."plugins, ".
- $config->getValue('table_prefix')."post_errors, ".$config->getValue('table_prefix')."posts, ".
- $config->getValue('table_prefix')."user_errors, ".$config->getValue('table_prefix')."users, ".
- $config->getValue('table_prefix')."favorites, ".
+ $config->getValue('table_prefix')."plugins, ". $config->getValue('table_prefix')."post_errors, ".
+ $config->getValue('table_prefix')."posts, ". $config->getValue('table_prefix')."user_errors, ".
+ $config->getValue('table_prefix')."users, ".$config->getValue('table_prefix')."favorites, ".
$config->getValue('table_prefix')."follows, ".$config->getValue('table_prefix')."links," .
$config->getValue('table_prefix')."options";
PDODAO::$PDO->exec($q);
@@ -388,7 +382,7 @@ public function testGetTablesToInstall(){
$installer = Installer::getInstance();
$tables = $installer->getTablesToInstall();
$expected_tables = array('encoded_locations', 'favorites', 'follower_count', 'follows', 'instances', 'links',
- 'options', 'owner_instances', 'owners', 'plugin_options', 'plugins', 'post_errors', 'posts', 'user_errors',
+ 'options', 'owner_instances', 'owners', 'plugins', 'post_errors', 'posts', 'user_errors',
'users');
$this->assertIdentical($tables, $expected_tables);
}
View
2 tests/TestOfInstallerMySQLDAO.php
@@ -85,7 +85,7 @@ public function testGetTables() {
$config_array = $config->getValuesArray();
$dao = new InstallerMySQLDAO($config_array);
$result = $dao->getTables();
- $this->assertEqual(sizeof($result), 15);
+ $this->assertEqual(sizeof($result), 14);
$this->assertEqual($result[0], $config_array["table_prefix"].'encoded_locations');
}
public function testCheckTable() {
View
47 tests/WebTestOfUpgradeDatabase.php
@@ -213,14 +213,16 @@ private function setUpApp($version, $MIGRATIONS) {
$config = Config::getInstance();
$current_version = $config->getValue('THINKUP_VERSION');
+ $latest_migration = glob($migration_sql_dir . '*_v' . $LATEST_VERSION .'.sql.migration');
if($LATEST_VERSION == $current_version) {
$this->debug("Building zip for latest version: $LATEST_VERSION");
$sql_files = glob($migration_sql_dir . '*.sql');
if (sizeof($sql_files) > 0) {
- $this->debug("found sql update for lasest version $LATEST_VERSION: $sql_files[0]");
- $latest_migration = glob($migration_sql_dir . '*_v' . $LATEST_VERSION .'.sql.migration');
+ $this->debug("found sql update for latest version $LATEST_VERSION: $sql_files[0]");
if(! isset($latest_migration[0])) {
- $latest_migration_file = $migration_sql_dir . '0001-01-01_v' . $LATEST_VERSION .'.sql.migration';
+ $date_stamp = date("Y-m-d");
+ $latest_migration_file = $migration_sql_dir . $date_stamp . '_v' . $LATEST_VERSION .
+ '.sql.migration';
$fp = fopen($latest_migration_file, 'w');
$sql_files = glob($migration_sql_dir . '*.sql');
$sql_file = $sql_files[0];
@@ -233,6 +235,9 @@ private function setUpApp($version, $MIGRATIONS) {
}
exec('extras/scripts/generate-distribution');
exec('cp build/thinkup.zip build/' . $LATEST_VERSION . '.zip');
+ if(file_exists($latest_migration_file)) {
+ unlink( $latest_migration_file );
+ }
}
return array('MIGRATIONS' => $MIGRATIONS, 'latest_migration_file' => $latest_migration_file );
}
@@ -278,14 +283,27 @@ private function runMigrations($TMIGRATIONS, $base_version) {
preg_match("/sql_array = (\[.*?])/", $content, $matches);
$json_array = json_decode($matches[1]);
$cnt = 0;
+
foreach($json_array as $json_migration) {
- $cnt++;
+
$this->debug("running migration: " . $json_migration->version);
+
+ // if there is setup_sql run it
+ if(isset($MIGRATIONS[$json_migration->version ]['setup_sql'])) {
+ $this->debug('running setup_sql scripts');
+ $install_dao = DAOFactory::getDAO('InstallerDAO');
+ foreach($MIGRATIONS[$json_migration->version ]['setup_sql'] as $sql) {
+ $this->debug('running setup_sql script: ' . substr($sql, 0, 40) . '...');
+ $install_dao->runMigrationSQL($sql);
+ }
+ }
+ $cnt++;
$this->get($token_url . "&migration_index=" . $cnt);
$this->assertText('{"processed":true,');
+
$this->debug("Running migration assertion test for " . $json_migration->version);
$assertions = $MIGRATIONS[ $json_migration->version ];
- //var_dump($assertions);
+
foreach($assertions['migration_assertions']['sql'] as $assertion_sql) {
// don't run the database_version assertion if it exists, this will get run below...
if(preg_match("/database_version/i", $assertion_sql['query'])) {
@@ -294,12 +312,16 @@ private function runMigrations($TMIGRATIONS, $base_version) {
$this->debug("Running assertion sql: " . $assertion_sql['query']);
$stmt = $this->pdo->query($assertion_sql['query']);
$data = $stmt->fetch(PDO::FETCH_ASSOC);
- $this->assertEqual(preg_match($assertion_sql['match'], $data[ $assertion_sql['column'] ]), 1,
- $assertion_sql['match'] . ' should match ' . $data[ $assertion_sql['column'] ]);
+ if(isset($assertion_sql['no_match'])) {
+ $this->assertFalse($data, 'no results for query'); // a table or column deleted?
+ } else {
+ $this->assertEqual(preg_match($assertion_sql['match'], $data[ $assertion_sql['column'] ]), 1,
+ $assertion_sql['match'] . ' should match ' . $data[ $assertion_sql['column'] ]);
+ $stmt->closeCursor();
+ }
$stmt->closeCursor();
}
}
- //return;
$this->get($token_url . '&migration_done=true');
$this->assertText('{"migration_complete":true}');
$this->get($this->url.'/test_installer/thinkup/');
@@ -312,14 +334,17 @@ private function runMigrations($TMIGRATIONS, $base_version) {
$this->debug("Running assertion sql: " . $assertion['query']);
$stmt = $this->pdo->query($assertion['query']);
$data = $stmt->fetch(PDO::FETCH_ASSOC);
- $this->assertEqual(preg_match($assertion['match'], $data[ $assertion['column'] ]), 1,
- $assertion['match'] . ' should match ' . $data[ $assertion['column'] ]);
+ if(isset($assertion['no_match'])) {
+ $this->assertFalse($data, 'no results for query'); // a table or column deleted?
+ } else {
+ $this->assertEqual(preg_match($assertion['match'], $data[ $assertion['column'] ]), 1,
+ $assertion['match'] . ' should match ' . $data[ $assertion['column'] ]);
+ }
$stmt->closeCursor();
}
}
}
}
-
/**
* Downloads install/upgrade zip file if needed, returns path to zip file.
* @param str Url
View
39 tests/migration-assertions.php
@@ -29,7 +29,7 @@
*
* Database migration assertions to test during WebTestOfUpgradeDatabase
*/
-$LATEST_VERSION = 0.7;
+$LATEST_VERSION = '0.8';
$MIGRATIONS = array(
/* beta 0.1 */
@@ -200,8 +200,19 @@
/* beta 0.7 */
'0.7' => array(
- 'zip_url' => 'file://./build/thinkup.zip',
+ 'zip_url' => 'https://github.com/downloads/ginatrapani/ThinkUp/thinkup-0.7.zip',
'migrations' => 1,
+ 'setup_sql' => array("DROP TABLE IF EXISTS tu_plugin_options",
+ "CREATE TABLE `tu_plugin_options` (" .
+ "`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ," .
+ "`plugin_id` INT NOT NULL ," .
+ "`option_name` VARCHAR( 255 ) NOT NULL ," .
+ "`option_value` VARCHAR( 255 ) NOT NULL ," .
+ "INDEX ( `plugin_id` )" .
+ ") ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin",
+ "INSERT INTO tu_plugin_options (plugin_id, option_name, option_value) " .
+ "VALUES (2345, 'test_plugin_name', 'test_plugin_value')"
+ ),
'migration_assertions' => array(
'sql' => array(
array(
@@ -224,12 +235,26 @@
'match' => "/int\(11\)/",
'column' => 'Type',
),
-// array(
-// 'query' => "SELECT namespace FROM tu_options WHERE namespace LIKE 'plugin_options-1' ",
-// 'match' => "/plugin_options-1/",
-// 'column' => 'namespace',
-// ),
+ array(
+ 'query' => "SELECT namespace FROM tu_options WHERE namespace LIKE 'plugin_options-2345' ",
+ 'match' => "/plugin_options-2345/",
+ 'column' => 'namespace',
+ )
)
)
),
+
+ /* beta 0.8 */
+// '0.8' => array(
+// 'zip_url' => 'file://./build/thinkup.zip',
+// 'migrations' => 1,
+// 'migration_assertions' => array(
+// 'sql' => array(
+// array(
+// 'query' => "show tables like 'tu_plugin_options'", // table is dropped
+// 'no_match' => true,
+// )
+// )
+// )
+// ),
);
View
17 webapp/install/sql/build-db_mysql.sql
@@ -1,6 +1,6 @@
--
-- ThinkUp Database Creation Script
--- Auto-generated by thinkup/extras/scripts/migratedb script on 2010-12-27
+-- Auto-generated by thinkup/extras/scripts/migratedb script on 2011-01-08
--
ALTER DATABASE DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
@@ -169,19 +169,6 @@ CREATE TABLE tu_owners (
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
--- Table structure for table tu_plugin_options
---
-
-CREATE TABLE tu_plugin_options (
- id int(11) NOT NULL AUTO_INCREMENT,
- plugin_id int(11) NOT NULL,
- option_name varchar(255) NOT NULL,
- option_value varchar(255) NOT NULL,
- PRIMARY KEY (id),
- KEY plugin_id (plugin_id)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
---
-- Table structure for table tu_plugins
--
@@ -301,7 +288,7 @@ CREATE TABLE tu_users (
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--- Dump completed on 2010-12-27 9:05:14
+-- Dump completed on 2011-01-08 20:11:36
--
-- Insert DB Version
View
13 webapp/install/sql/mysql_migrations/2010-12-27_v0.7.sql.migration
@@ -6,15 +6,16 @@ ALTER TABLE tu_owners ADD failed_logins INT NOT NULL DEFAULT '0';
ALTER TABLE tu_owners ADD account_status VARCHAR( 150 ) NOT NULL DEFAULT '';
--
+-- 2010-12-21 Retweet handling
+--
+ALTER TABLE tu_posts ADD in_rt_of_user_id bigint(11) DEFAULT NULL;
+ALTER TABLE tu_posts CHANGE retweet_count_cache old_retweet_count_cache int(11) NOT NULL DEFAULT '0';
+ALTER TABLE tu_posts ADD retweet_count_cache int(11) NOT NULL DEFAULT '0';
+
+--
-- 2010-12-21 Plugin option migration
--
INSERT INTO tu_options (namespace, option_name, option_value, last_updated, created)
(SELECT concat('plugin_options-', plugin_id), option_name, option_value, now(), now() FROM tu_plugin_options);
---
--- 2010-12-21 Retweet handling
---
-ALTER TABLE tu_posts ADD in_rt_of_user_id bigint(11) DEFAULT NULL;
-ALTER TABLE tu_posts CHANGE retweet_count_cache old_retweet_count_cache int(11) NOT NULL DEFAULT '0';
-ALTER TABLE tu_posts ADD retweet_count_cache int(11) NOT NULL DEFAULT '0';
View
1 webapp/install/sql/mysql_migrations/2011_01_02-plugin-options-table-cleanup.sql
@@ -0,0 +1 @@
+DROP TABLE IF EXISTS tu_plugin_options;
View
1 webapp/plugins/facebook/tests/TestOfFacebookPluginConfigurationController.php
@@ -196,7 +196,6 @@ public function testConfigOptionsIsAdmin() {
$namespace = OptionDAO::PLUGIN_OPTIONS . '-2';
$prefix = Config::getInstance()->getValue('table_prefix');
OwnerMysqlDAO::$PDO->query("delete from " . $prefix . "options where namespace = '$namespace'");
- $options_arry[0]->truncateTable('plugin_options');
$controller = new FacebookPluginConfigurationController($owner, 'facebook');
$output = $controller->go();
$this->assertPattern('/var required_values_set = false/', $output); // is not configured
View
15 ...pp/plugins/flickrthumbnails/tests/TestOfFlickrThumbnailsPluginConfigurationController.php
@@ -84,8 +84,6 @@ public function testConstructor() {
}
public function testOutputNoParams() {
- // build some options data
- $options_arry = $this->buildPluginOptions();
//not logged in, no owner set
$controller = new FlickrThumbnailsPluginConfigurationController(null, 'flickrthumbnails');
@@ -109,7 +107,6 @@ public function testOutputNoParams() {
*/
public function testConfigOptionsNotAdmin() {
// build some options data
- $options_arry = $this->buildPluginOptions();
$this->simulateLogin('me@example.com');
$owner_dao = DAOFactory::getDAO('OwnerDAO');
$owner = $owner_dao->getByEmail(Session::getLoggedInUser());
@@ -121,7 +118,6 @@ public function testConfigOptionsNotAdmin() {
$this->assertPattern('/var is_admin = false/', $output); // not a js admin
//app not configured
- $options_arry[0]->truncateTable('plugin_options');
$controller = new FlickrThumbnailsPluginConfigurationController($owner, 'flickrthumbnails');
$output = $controller->go();
$this->assertPattern('/var required_values_set = false/', $output); // is not configured
@@ -132,7 +128,6 @@ public function testConfigOptionsNotAdmin() {
*/
public function testConfigOptionsIsAdmin() {
// build some options data
- $options_arry = $this->buildPluginOptions();
$this->simulateLogin('me@example.com', $isadmin = true);
$owner_dao = DAOFactory::getDAO('OwnerDAO');
$owner = $owner_dao->getByEmail(Session::getLoggedInUser());
@@ -144,19 +139,9 @@ public function testConfigOptionsIsAdmin() {
$this->assertPattern('/var is_admin = true/', $output); // is a js admin
//app not configured
- $options_arry[0]->truncateTable('plugin_options');
$controller = new FlickrThumbnailsPluginConfigurationController($owner, 'flickrthumbnails');
$output = $controller->go();
$this->assertPattern('/var required_values_set = false/', $output); // is not configured
}
- /**
- * build plugin option values
- */
- private function buildPluginOptions() {
- $plugin_options1 =
- FixtureBuilder::build('plugin_options',
- array('plugin_id' => 1, 'option_name' => 'flickr_api_key', 'option_value' => "dummykey") );
- return array($plugin_options1);
- }
}
View
2 webapp/plugins/geoencoder/tests/TestOfGeoEncoderPluginConfigurationController.php
@@ -209,7 +209,6 @@ public function testConfigOptionsNotAdmin() {
$prefix = Config::getInstance()->getValue('table_prefix');
$namespace = $build_data[3]->columns['namespace'];
OwnerMysqlDAO::$PDO->query("delete from " . $prefix . "options where namespace = '$namespace'");
- $build_data[3]->truncateTable('plugin_options');
$controller = new GeoEncoderPluginConfigurationController($owner, 'geoencoder');
$output = $controller->go();
@@ -236,7 +235,6 @@ public function testConfigOptionsIsAdmin() {
$prefix = Config::getInstance()->getValue('table_prefix');
$namespace = $build_data[3]->columns['namespace'];
OwnerMysqlDAO::$PDO->query("delete from " . $prefix . "options where namespace = '$namespace'");
- $build_data[3]->truncateTable('plugin_options');
$controller = new GeoEncoderPluginConfigurationController($owner, 'geoencoder');
$output = $controller->go();
$this->assertPattern('/var required_values_set = false/', $output); // is not configured
View
2 webapp/plugins/twitter/tests/TestOfTwitterCrawler.php
@@ -364,8 +364,6 @@ public function testFetchFavoritesOfInstanceuser() {
$this->logger->logInfo("second round of archiving", __METHOD__.','.__LINE__);
$this->api->available_api_calls_for_crawler = 10;
$this->api->to->setDataPath('webapp/plugins/twitter/tests/testdata/favs_tests/favs_stage2/');
- $builder2 = FixtureBuilder::build('plugin_options', array('plugin_id'=>1, 'option_name'=>'favs_older_pages',
- 'option_value'=>10));
$tc = new TwitterCrawler($this->instance, $this->api);
$tc->fetchInstanceUserInfo();
$tc->fetchInstanceFavorites();
View
4 webapp/plugins/twitter/tests/TestOfTwitterPluginConfigurationController.php
@@ -171,7 +171,6 @@ public function testConfigOptionsNotAdmin() {
$this->assertPattern('/var is_admin = false/', $output); // not a js admin
//app not configured
- $options_arry[0]->truncateTable('plugin_options');
$controller = new FacebookPluginConfigurationController($owner, 'facebook');
$output = $controller->go();
$this->assertPattern('/var required_values_set = false/', $output); // is not configured
@@ -197,7 +196,6 @@ public function testConfigOptionsIsAdmin() {
$this->assertPattern('/var is_admin = true/', $output); // is a js admin
//app not configured
- $options_arry[0]->truncateTable('plugin_options');
$controller = new FacebookPluginConfigurationController($owner, 'facebook');
$output = $controller->go();
$this->assertPattern('/var required_values_set = false/', $output); // is not configured
@@ -215,7 +213,7 @@ private function buildPluginOptions() {
FixtureBuilder::build('options',
array('namespace' => $namespace, 'option_name' => 'oauth_consumer_secret', 'option_value' => "12345") );
$plugin_options3 =
- FixtureBuilder::build('plugin_options',
+ FixtureBuilder::build('options',
array('namespace' => $namespace, 'option_name' => 'num_twitter_errors', 'option_value' => "5") );
return array($plugin_options1, $plugin_options2, $plugin_options3);
}

0 comments on commit e90a1bc

Please sign in to comment.