PHP Unit Testing Updates#97
Conversation
…nt version. Remove test code related to older versions of WP. Update is_responsive_bu_domain tests to use different test for multi vs single site.
| @@ -148,18 +148,39 @@ function test_responsive_is_bu_domain() { | |||
| * Test that BU domains correctly match. | |||
| */ | |||
| function test_responsive_is_bu_domain_true() { | |||
There was a problem hiding this comment.
I always wondered if this truly the full list of subdomains we should check for (what about sites.bu.edu, sites-staging.bu.edu, ect.). Also do we need to worry about this catching domains like agganisarena.com, citycoboston.com, others?
There was a problem hiding this comment.
This is a good question. My initial goal here was to get the broken test working again. I appreciate how having the Unit tests prompted this deeper follow up.
Currently the function is only looking for bu.edu in the URL
responsive-framework/inc/template-tags.php
Lines 179 to 181 in 1f5a8ae
The functions only current use is to add a meta value with the Boston University name and Copyright. With branding guidelines do we want sites.bu.edu to get the BU Copyright key? Also, do we want agganisarena.com, citycoboston.com to get this copyright meta value? What about blogs.bu.edu?
responsive-framework/header.php
Lines 28 to 32 in 7f92fb4
If we do want these sites to get the copyright meta value, then we need to update the function and the test.
Who can confirm the list of sites and subdomains that need to get the Boston University copyright meta value?
There was a problem hiding this comment.
As discussed in person, I opened an issue for the broader question. #110
Please approve so we can close this as is and fix the tests.
|
This looks good to me also! Just for more context: I had updated the |
* develop: (1259 commits) Run grunt build to complete version bump to 2.1.9 Bump version to 2.1.9 and update CHANGELOG Fix CHANGELOG nested ul indendation Fix multiple Code Climate issues on CHANGELOG Update CHANGELOG with bugfix notes Update CHANGELOG to use level 2 headings Bugfix: Prevent empty post title from rendering Bugfix: Fix typo in name of customizer filter version bump add unit tests for r_page_title_class add $display parameter to function update templates to use parameter Add filter to filter the page title class removing stray junk updating tests restoring code to old working version Add the global favicon back for non-BU domains version bump Temporarily remove the `r_remove_news_template` filter Move the `include` out of the `if` Update README.md ... # Conflicts: # CHANGELOG.md
* develop: (1254 commits) PHP Unit Testing Updates (#97) Run grunt build to complete version bump to 2.1.9 Bump version to 2.1.9 and update CHANGELOG version bump add unit tests for r_page_title_class add $display parameter to function update templates to use parameter Add filter to filter the page title class removing stray junk updating tests restoring code to old working version Add the global favicon back for non-BU domains version bump Temporarily remove the `r_remove_news_template` filter Move the `include` out of the `if` Update README.md add contributor Version Bump 2.0.1 Code Climate Revision 2 Code Climate Revision Hub Indicator Style Integration ...
* develop: (1255 commits) Migrate Open PR #418 from 1x-develop fix deprecated GF call (#107) PHP Unit Testing Updates (#97) Run grunt build to complete version bump to 2.1.9 Bump version to 2.1.9 and update CHANGELOG version bump add unit tests for r_page_title_class add $display parameter to function update templates to use parameter Add filter to filter the page title class removing stray junk updating tests restoring code to old working version Add the global favicon back for non-BU domains version bump Temporarily remove the `r_remove_news_template` filter Move the `include` out of the `if` Update README.md add contributor Version Bump 2.0.1 Code Climate Revision 2 Code Climate Revision ... # Conflicts: # languages/responsive-framework.pot
* develop: (1255 commits) Migrate Open PR #418 from 1x-develop fix deprecated GF call (#107) PHP Unit Testing Updates (#97) Run grunt build to complete version bump to 2.1.9 Bump version to 2.1.9 and update CHANGELOG version bump add unit tests for r_page_title_class add $display parameter to function update templates to use parameter Add filter to filter the page title class removing stray junk updating tests restoring code to old working version Add the global favicon back for non-BU domains version bump Temporarily remove the `r_remove_news_template` filter Move the `include` out of the `if` Update README.md add contributor Version Bump 2.0.1 Code Climate Revision 2 Code Climate Revision ... # Conflicts: # languages/responsive-framework.pot
* develop: (1262 commits) Migrate Open PR #407 from 1x-develop Security Audit June 2018 (#106) Migrate Open PR #418 from 1x-develop fix deprecated GF call (#107) PHP Unit Testing Updates (#97) Run grunt build to complete version bump to 2.1.9 Bump version to 2.1.9 and update CHANGELOG Fix CHANGELOG nested ul indendation Fix multiple Code Climate issues on CHANGELOG Update CHANGELOG with bugfix notes Update CHANGELOG to use level 2 headings Bugfix: Prevent empty post title from rendering Bugfix: Fix typo in name of customizer filter version bump add unit tests for r_page_title_class add $display parameter to function update templates to use parameter Add filter to filter the page title class removing stray junk updating tests restoring code to old working version Add the global favicon back for non-BU domains version bump ... # Conflicts: # CHANGELOG.md
[X] I've reviewed the contribution guidelines.
[X] I've updated
CHANGELOG.MDwith a brief explanation of the changes in this pull request in the unreleased section.[X] My code follows BU Coding Standards.