protected function __construct() { $this->admin = new SpotIM_Admin(); $this->api = new SpotIM_API_Dispatcher(); // setup front-end if (!is_admin()) { SpotIM_Frontend::setup(); $get = $_GET; if (isset($get['p']) && $get['p'] != '' && isset($get['json-comments'])) { $post_ids = (array) $get['p']; SpotIM_Export::generate_json_by_post($post_ids); } } }
public function test_empty_conversation_shouldnt_be_included() { // create an empty post $post_id = $this->factory->post->create(); // now there are two posts in total. there should be only 1 conversation in export. $this->assertCount(1, SpotIM_Export::start()); }