[wp-trac] [WordPress Trac] #35272: .menu-item-home class not applying to static front pages

WordPress Trac noreply at wordpress.org
Wed Oct 26 11:38:29 UTC 2016


#35272: .menu-item-home class not applying to static front pages
---------------------------------------------+---------------------
 Reporter:  RachieVee                        |       Owner:  pento
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  4.7
Component:  Menus                            |     Version:  4.4
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:
---------------------------------------------+---------------------

Comment (by welcher):

 Replying to [comment:25 mdgl]:
 > I'm afraid I don't know how to run the unit tests, so this is just based
 on inspection.

 Have a look at https://make.wordpress.org/core/handbook/testing/automated-
 testing/phpunit/ or http://ryanwelcher.com/2015/07/setting-up-unit-
 testing-for-wordpress-core/ to help you get setup.
 >

 > Could somebody tell me whether the unit tests are able to pick up the
 difference between these two solutions? To my eyes, there doesn't appear
 to be quite enough code to do that.

 The specific test of two menu items and one is set to the front page is
 not in place. The current tests do not check for that. However, there is a
 test that tests for a page that is not assigned to the home page and
 another that tests for one that is. It would not be a large lift to add a
 third to cover off your scenario

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35272#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list