expectOutputRegex( '/notice-error/' ); \delete_option( 'permalink_structure' ); } public function test_has_permalink_structure_no_errors() { \add_option( 'permalink_structure', '/archives/%post_id%' ); \do_action( 'admin_notices' ); $this->expectOutputRegex( '/^((?!notice-error).)*$/s' ); \delete_option( 'permalink_structure' ); } }