- Issue created by @phenaproxima
- ๐ฎ๐ณIndia arunsahijpal
Hi @phenaproxima,
That makes senseโmixing test-related logic into production code withdrupal_valid_test_ua()
can make the codebase harder to maintain.
So I'm planning to Introduce a service to determine test mode (TestModeChecker
), and will replacedrupal_valid_test_ua()
calls with service usage.Would it be a good solution?
- ๐บ๐ธUnited States phenaproxima Massachusetts
I don't think that would really solve the problem, to be honest; the idea is to remove any testing-related code from the production code. There are other approaches we can take, but they'll vary based on the specific use. In other words, we're going to need a few different approaches for this one.
I'll take this on!
- Merge request !832Remove drupal_valid_test_ua from recipes source โ (Merged) created by phenaproxima
- Assigned to phenaproxima
- ๐บ๐ธUnited States phenaproxima Massachusetts
This doesn't go as far as I would like, but trying to completely remove switches that are only used for testing turned out to be a little bit dragon-shaped. I think we can have follow-ups to properly do the remainder of the cleanup (i.e., making certain things actual configuration options), but this at least gets rid of the ugly calls to
drupal_valid_test_ua()
. - ๐บ๐ธUnited States phenaproxima Massachusetts
Tagging for backport to 2.0.x.
- ๐บ๐ธUnited States tim.plunkett Philadelphia
This looks good. I remember feeling a way about having `drupal_valid_test_ua()` in runtime code when we added it, glad to see it gone.
- First commit to issue fork.
-
chrisfromredfin โ
committed e9965baf on 2.1.x authored by
phenaproxima โ
Issue #3511005 by phenaproxima, chrisfromredfin, tim.plunkett: Remove...
-
chrisfromredfin โ
committed e9965baf on 2.1.x authored by
phenaproxima โ
- ๐บ๐ธUnited States chrisfromredfin Portland, Maine
rebased and merged onto 2.1.x, conflicts in backport
-
chrisfromredfin โ
committed 9f1ee0b1 on 2.0.x authored by
phenaproxima โ
Issue #3511005 by phenaproxima, chrisfromredfin, tim.plunkett: Remove...
-
chrisfromredfin โ
committed 9f1ee0b1 on 2.0.x authored by
phenaproxima โ
- ๐บ๐ธUnited States chrisfromredfin Portland, Maine
backported! thanks, @phenaproxima
Automatically closed - issue fixed for 2 weeks with no activity.