I'm opening a new issue for this because it's going to require experimenting with the testbot and some time to build a set of tests. Feel free to contribute!
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | 3128807-15-mimemail-example-test-only.patch | 3 KB | tr |
| #7 | 3128807-7-mimemail-example-test-only.patch | 3.84 KB | tr |
| #2 | 3128807-2-mimemail-example-test-only.patch | 2.29 KB | tr |
Comments
Comment #2
tr commentedPatch.
Comment #4
imclean commentedJust a note that I was receiving a 404 error from Apache on my local development environment for all paths starting with "/example". The request wasn't even getting to Drupal.
Apache's "MultiView" was enabled by default. Removing "Multiview" from the VirtualHost resolved the problem.
Comment #5
tr commentedInteresting. The /example/mimemail_example path was copied directly from the D7 version, but I was thinking about changing that and putting it under /admin because that would be more consistent with how we usually do things in Drupal and because then the page would inherit admin access permissions. I might as well try that and see if it makes a difference with the test, as I still can not see anything wrong with the test code (and the modules + tests work for me locally too).
Comment #6
imclean commentedI tested it with a path of
/admin/config/system/mimemail/mimemail_examplewhich worked and helped me narrow down the problem.Comment #7
tr commented/admin/config/system/mimemail/mimemail_exampleseems reasonable to me. I also added a link into .info.yml so this form can be found. Let's see if this works ...Comment #8
tr commentedWow, I'm amazed that worked. So the problem was using a path that began with "/example". That's definitely a bug with whatever testing environment is set up by DrupalCI - I'll work on getting that reported and fixed, or at the very least documented.
Thanks @imclean, I don't think I would have figured that out by myself anytime in the near future.
Comment #9
imclean commentedInteresting. I wonder what the testing environment entails. There's some commentary regarding MultiViews and Drupal but I haven't read much of it.
I mistyped, it's actually "MultiViews".
Comment #10
tr commentedHere's a patch where I changed 'example/mimemail_example' to 'elpmaxe/mimemail_example'. I expect this to work if the problem is because of the "example" path.
Comment #11
tr commentedYeah, so this is definitely something about the use of /example in the path.
The tests work when the path is defined to be
/elpmaxe/mimemail_examplebut fail with/example/mimemail_example- everything else is the same.Comment #12
tr commentedExact same patch as #2 but with path is defined to be
/elpmaxe/mimemail_exampleinstead of/example/mimemail_exampleComment #13
tr commentedTrying with /subdirectory instead of /example or /elpmaxe ...
Comment #15
tr commentedOK, here's the final patch to add the test case. Back to using /admin/config/system/mimemail/mimemail_example
Comment #17
tr commentedCommitted.