Support » Fixing WordPress » How test admin content in PHPUnit

  • Hi all.

    How I can test the html-content of my plugin in wp-admin with PHPUnit tests.
    I want something like this:

    
    set_current_screen('admin_page_myplugin');
    $html = $this->getOriginalHTML();
    $this->assertContains('My plugin unique content', $html);
    
  • You must be logged in to reply to this topic.