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

28 lines
667 B
PHP
Raw Normal View History

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