Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweaked the get_domains_by_type() to return alphabetically #95

Merged
merged 3 commits into from
May 1, 2022

Conversation

cameronterry
Copy link
Owner

This method was causing an "error" in the unit tests as the array mismatched the return.

Not really an "bug" per se, but the ordering of results from get_domains_by_type() was weird and making it return alphabetically - A to Z - makes more sense.

Resolves the following unit test error:

4) MediaDomainsTest::test_get_media_domains_manual
Media domains set by constant.
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     0 => DM_Domain Object (
-        'id' => 18
+        'id' => 20
         'blog_id' => 17
         'is_primary' => false
-        'domain' => 'cdn1.mappeddomain1.test'
+        'domain' => 'cdn3.mappeddomain1.test'
         'active' => true
         'is_https' => true
         'type' => 2
@@ @@
     )
     1 => DM_Domain Object (...)
     2 => DM_Domain Object (
-        'id' => 20
+        'id' => 18
         'blog_id' => 17
         'is_primary' => false
-        'domain' => 'cdn3.mappeddomain1.test'
+        'domain' => 'cdn1.mappeddomain1.test'
         'active' => true
         'is_https' => true
         'type' => 2
     )
 )

/home/runner/work/dark-matter/dark-matter/tests/phpunit/domain-mapping/MediaDomainsTest.php:94

@cameronterry cameronterry self-assigned this May 1, 2022
@cameronterry cameronterry merged commit e656658 into release/2.3.0 May 1, 2022
@cameronterry cameronterry deleted the fix/get-domains-ordering branch May 1, 2022 13:31
@cameronterry cameronterry mentioned this pull request May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant