4 * TestCase base class for convenience methods.
6 class Yst_License_Manager_UnitTestCase extends WP_UnitTestCase {
12 protected function set_post( $key, $value ) {
13 $_POST[$key] = $_REQUEST[$key] = addslashes( $value );
19 protected function unset_post( $key ) {
20 unset( $_POST[$key], $_REQUEST[$key] );
24 * Fake a request to the WP front page
26 protected function go_to_home() {
27 $this->go_to( home_url( '/' ) );
31 * @param string $string
32 * @param mixed $function
34 protected function expectOutput( $string, $function = null ) {
35 $output = ob_get_contents();
37 $this->assertEquals( $output, $string );