[wp-trac] [WordPress Trac] #25856: debug of wpautop function with Unit Tests

WordPress Trac noreply at wordpress.org
Sat Nov 16 16:43:15 UTC 2013


#25856: debug of wpautop function with Unit Tests
-------------------------+--------------------
 Reporter:  mdbitz       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  3.8
Component:  Formatting   |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+--------------------

Comment (by nacin):

 This is fantastic work.

 Since it is so massive, let's split the final test's data into two
 separate text files — tests/phpunit/data/formatting/wpautop-raw.txt and
 wpautop-expected.txt (or something). Ideally, test_verify_large_content()
 is actually split into a separate test for each block of text it is
 dealing with. I'm sure I'll have more feedback on how to best segment the
 tests as I continue to review this. Great work.

 Functions like wpautop() definitely can only be improved upon with
 adequate unit test coverage. But there is also the need to balance that
 with performance. We need to make sure the patch to wpautop() keeps that
 function about as performant as it is now. We could benefit from some
 proper before-and-after profiling/benchmarking here for sure.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25856#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list