what-did-they-say/test/WDTSTranscriptOptionsTest.php

28 lines
640 B
PHP
Raw Permalink Normal View History

2009-09-11 01:00:10 +00:00
<?php
require_once('PHPUnit/Framework.php');
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)
);
}
}
?>