remove center widget database field

This commit is contained in:
John Bintz 2009-06-26 06:53:00 -04:00
parent bf057fdc9d
commit 0c8c8a1722
2 changed files with 6 additions and 7 deletions

View File

@ -2,7 +2,7 @@
require_once('PublisherInfo.php'); require_once('PublisherInfo.php');
define("PLUGIN_WONDERFUL_DATABASE_VERSION", 4); define("PLUGIN_WONDERFUL_DATABASE_VERSION", 5);
/** /**
* The interface to the PW database table. * The interface to the PW database table.
@ -29,8 +29,7 @@ class PWAdboxesClient {
array('standardcode', 'text', '', 'NOT NULL'), array('standardcode', 'text', '', 'NOT NULL'),
array('advancedcode', 'text', '', 'NOT NULL'), array('advancedcode', 'text', '', 'NOT NULL'),
array('template_tag_id', 'char', '30', ''), array('template_tag_id', 'char', '30', ''),
array('in_rss_feed', 'int', '1', ''), array('in_rss_feed', 'int', '1', '')
array('center_widget', 'int', '1', '')
); );
} }

View File

@ -14,7 +14,7 @@ class PWAdboxesClientTest extends PHPUnit_Framework_TestCase {
'dimensions' => "1x1", 'rating' => "a", 'category' => "a", 'dimensions' => "1x1", 'rating' => "a", 'category' => "a",
'description' => "a", 'tags' => 'a', 'standardcode' => 'a', 'description' => "a", 'tags' => 'a', 'standardcode' => 'a',
'advancedcode' => 'a', 'adtype' => 'a', 'template_tag_id' => 'a', 'advancedcode' => 'a', 'adtype' => 'a', 'template_tag_id' => 'a',
'in_rss_feed' => 0, 'center_widget' => 0); 'in_rss_feed' => 0);
} }
function testCreateTables() { function testCreateTables() {
@ -50,7 +50,7 @@ class PWAdboxesClientTest extends PHPUnit_Framework_TestCase {
$ads->adboxes = array($this->sample_ad); $ads->adboxes = array($this->sample_ad);
$wpdb->expects($this->exactly(14))->method('escape'); $wpdb->expects($this->exactly(13))->method('escape');
$wpdb->expects($this->exactly(2))->method('query')->will($this->returnCallback(array($this, 'postAdsCallback'))); $wpdb->expects($this->exactly(2))->method('query')->will($this->returnCallback(array($this, 'postAdsCallback')));
$wpdb->expects($this->exactly(1))->method('get_results')->will($this->returnValue(array()))->with("SELECT adboxid, template_tag_id, in_rss_feed, center_widget FROM {$this->database_client->table_name}"); $wpdb->expects($this->exactly(1))->method('get_results')->will($this->returnValue(array()))->with("SELECT adboxid, template_tag_id, in_rss_feed, center_widget FROM {$this->database_client->table_name}");
@ -196,13 +196,13 @@ class PWAdboxesClientTest extends PHPUnit_Framework_TestCase {
'dimensions', 'rating', 'category', 'dimensions', 'rating', 'category',
'description', 'tags', 'standardcode', 'description', 'tags', 'standardcode',
'advancedcode', 'adtype', 'template_tag_id', 'advancedcode', 'adtype', 'template_tag_id',
'in_rss_feed', 'center_widget') as $field) { 'in_rss_feed') as $field) {
$large_sample_ad[$field] = $field . "-" . str_repeat("x", 300); $large_sample_ad[$field] = $field . "-" . str_repeat("x", 300);
} }
$ads->adboxes = array((object)$large_sample_ad); $ads->adboxes = array((object)$large_sample_ad);
$wpdb->expects($this->exactly(14))->method('escape')->will($this->returnCallback(array($this, 'postDataTooLargeCallback'))); $wpdb->expects($this->exactly(13))->method('escape')->will($this->returnCallback(array($this, 'postDataTooLargeCallback')));
$wpdb->expects($this->exactly(2))->method('query'); $wpdb->expects($this->exactly(2))->method('query');
$wpdb->expects($this->exactly(1))->method('get_results'); $wpdb->expects($this->exactly(1))->method('get_results');