Ejemplo n.º 1
0
 /**
  * @see WP_Customize_Section::print_template()
  */
 function test_print_templates_custom()
 {
     wp_set_current_user(self::$admin_id);
     $section = new Custom_Section_Test($this->manager, 'baz');
     ob_start();
     $section->print_template();
     $content = ob_get_clean();
     $this->assertContains('<script type="text/html" id="tmpl-customize-section-titleless">', $content);
     $this->assertNotContains('accordion-section-title', $content);
     $this->assertContains('accordion-section-content', $content);
 }
Ejemplo n.º 2
0
 /**
  * @see WP_Customize_Section::print_template()
  */
 function test_print_templates_custom()
 {
     wp_set_current_user($this->factory->user->create(array('role' => 'administrator')));
     $section = new Custom_Section_Test($this->manager, 'baz');
     ob_start();
     $section->print_template();
     $content = ob_get_clean();
     $this->assertContains('<script type="text/html" id="tmpl-customize-section-titleless">', $content);
     $this->assertNotContains('accordion-section-title', $content);
     $this->assertContains('accordion-section-content', $content);
 }