[wp-trac] [WordPress Trac] #44005: Privacy template file

WordPress Trac noreply at wordpress.org
Wed Mar 13 09:43:16 UTC 2019


#44005: Privacy template file
-------------------------------------------------+-------------------------
 Reporter:  Clorith                              |       Owner:  garrett-
                                                 |  eclipse
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  5.2
Component:  Privacy                              |     Version:  4.9.6
 Severity:  normal                               |  Resolution:
 Keywords:  needs-testing has-patch has-unit-    |     Focuses:  template,
  tests                                          |  privacy
-------------------------------------------------+-------------------------

Comment (by garrett-eclipse):

 Thanks @birgire for getting the unit tests started here.

 In [https://core.trac.wordpress.org/attachment/ticket/44005/44005.4.diff
 44005.4.diff] I've made some minor modifications;
 - Added a new line before the `test_is_privacy_policy` function.
 - Added `privacy-policy.php` to the `assertTemplateHierarchy` test in
 `test_privacy_template_hierarchy`
 - Added `'privacy_policy' => 'is_privacy_policy'` to the
 `test_single_template_hierarchy_for_post` test
 - Added `$this->assertEquals( get_privacy_policy_template(),
 get_query_template( 'privacy_policy', array( 'privacy-policy.php' ) ) );`
 to the `test_switch_theme`

 These are all passing in my `grunt test` and `phpunit` tests.

 Replying to [comment:16 birgire]:
 > ps: we could then consider a test with an actual privacy policy template
 file.
 *This makes sense to me although not sure how to go about do you want to
 take the lead on that @birgire.

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


More information about the wp-trac mailing list