[wp-unit-tests] [WordPress Unit Tests] #125: Test for Core Trac #5809

WordPress Trac wp-trac at lists.automattic.com
Sat Aug 25 19:21:53 UTC 2012


#125: Test for Core Trac #5809
----------------------------+------------------
 Reporter:  wonderboymusic  |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:
Component:  Taxonomy        |  Resolution:
 Keywords:  has-patch       |
----------------------------+------------------

Comment (by tomauger):

 Nice!

 I'm pretty unfamiliar with unit tests, but doesn't it seem like the first
 test:
 {{{$this->assertEquals( $t1['term_id'], $t2['term_id'] ); }}}
 ''ought'' to fail? Isn't that the point of the ticket - that inserting two
 terms (one a category, the other a tag) with the same name should have
 ''different'' IDs?

 The second test seems good to me, though I think I would have gone about
 it differently - after updating the second term, lookup the first term
 again and see if it's name has changed (rather than comparing the IDs).
 I'm not suggesting you change the second test, but consider adding a
 third?

-- 
Ticket URL: <http://unit-tests.trac.wordpress.org/ticket/125#comment:1>
WordPress Unit Tests <http://unit-tests.trac.wordpress.org>
My example project


More information about the wp-unit-tests mailing list