fix for badly-accessed object method in post media metabox

This commit is contained in:
John Bintz 2009-12-17 08:28:40 -05:00
parent 54774522c2
commit a9c6b3d65c
2 changed files with 8 additions and 3 deletions

View File

@ -25,6 +25,11 @@ class ComicPressPostMediaHandlingMetabox {
}
}
function _save_post($post_id) {
$mb = new ComicPressPostMediaHandlingMetabox();
$mb->save_post($post_id);
}
// @codeCoverageIgnoreStart
function admin_menu() {
add_meta_box('comicpress-post-media-handling', __('ComicPress Post Media', 'comicpress'), array('ComicPressPostMediaHandlingMetabox', 'metabox'), 'post', 'normal', 'low');
@ -46,4 +51,4 @@ class ComicPressPostMediaHandlingMetabox {
}
add_action('admin_menu', array('ComicPressPostMediaHandlingMetabox', 'admin_menu'));
add_action('save_post', array('ComicPressPostMediaHandlingMetabox', 'save_post'));
add_action('save_post', array('ComicPressPostMediaHandlingMetabox', '_save_post'));

View File

@ -37,7 +37,7 @@ class ArchiveDropdownWidgetTest extends PHPUnit_Framework_TestCase {
$html = $this->w->build_dropdown($entries);
foreach (array(
array('tag' => 'div', 'attributes' => array('class' => 'archive-dropdown-wrap')),
array('tag' => 'li', 'attributes' => array('class' => 'archive-dropdown-wrap')),
array('tag' => 'form', 'attributes' => array('action' => '', 'method' => 'get')),
array('tag' => 'select', 'attributes' => array('name' => 'cp[urls]')),
array('tag' => 'input', 'attributes' => array('name' => 'cp[_nonce]')),
@ -48,7 +48,7 @@ class ArchiveDropdownWidgetTest extends PHPUnit_Framework_TestCase {
array('tag' => 'option', 'attributes' => array('value' => 'test'), 'content' => 'Test'),
array('tag' => 'option', 'attributes' => array('value' => 'test2'), 'content' => 'Test2'),
) as $matcher) {
$this->assertTag($matcher, $html);
$this->assertTag($matcher, $html, print_r($matcher, true));
}
}
}