assertEquals($__post, 'test'); $this->assertEquals($expected_post, $post); $this->assertEquals($wp_query, $__wp_query); } function testRestore() { global $post, $__post; $post = 'not'; $__post = 'test'; Restore(); $this->assertEquals($__post, $post); } function testUnprotect() { global $post, $__post, $wp_query, $__wp_query; $__post = $__wp_query = 'test'; $post = $wp_query = 'not'; Unprotect(); $this->assertEquals('test', $post); $this->assertEquals('test', $wp_query); $this->assertTrue(is_null($__post)); $this->assertTrue(is_null($__wp_query)); } }