2009-09-11 01:00:10 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once('PHPUnit/Framework.php');
|
2009-10-17 17:00:56 +00:00
|
|
|
require_once('MockPress/mockpress.php');
|
2009-09-25 03:26:04 +00:00
|
|
|
require_once(dirname(__FILE__) . '/../classes/WDTSTranscriptOptions.inc');
|
2009-09-11 01:00:10 +00:00
|
|
|
|
|
|
|
class WDTSTranscriptOptionsTest extends PHPUnit_Framework_TestCase {
|
|
|
|
function setUp() {
|
|
|
|
_reset_wp();
|
|
|
|
|
|
|
|
wp_insert_post((object)array('ID' => 1));
|
|
|
|
|
|
|
|
$this->to = new WDTSTranscriptOptions(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
function testUpdateOption() {
|
|
|
|
update_post_meta(1, "transcript_options", array('test' => false));
|
|
|
|
|
|
|
|
$this->to->_update_option('test', true);
|
|
|
|
|
|
|
|
$this->assertEquals(
|
|
|
|
array('test' => true),
|
|
|
|
get_post_meta(1, 'transcript_options', true)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|