/** * @covers GVCommon::get_meta_template_id * @covers ::gravityview_get_template_id() */ function test_get_meta_template_id() { $form_id = '1234'; $template_id = 'example_template_id'; $view_id = $this->factory->view->create(array('form_id' => $form_id, 'template_id' => $template_id)); $this->assertEquals($template_id, GVCommon::get_meta_template_id($view_id)); }
/** * Get the template ID (`list`, `table`, `datatables`, `map`) for a View * * @see GravityView_Template::template_id * * @param int $view_id The ID of the View to get the layout of * * @return string GravityView_Template::template_id value. Empty string if not. */ function gravityview_get_template_id($post_id) { return GVCommon::get_meta_template_id($post_id); }