Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is a follow-up to #2188157: D8 port views style plugin. Views integration has been ported but some test coverage for it still needs to be added.
Comment | File | Size | Author |
---|---|---|---|
#15 | juicebox-views_test_skelton-2586125-15.patch | 53.86 KB | rjacobs |
|
Comments
Comment #2
rjacobs CreditAttribution: rjacobs commentedHere's a base skeleton for the test. This is just a start, there are no assertions in place yet.
Comment #4
rjacobs CreditAttribution: rjacobs commentedHere's another skeleton with an improved schema for the test views and an alternate way of getting the views loaded. I'm hoping this passes testbots now (it does locally).
Comment #7
rjacobs CreditAttribution: rjacobs commentedWell this is fun, I can't replicate these failures locally, even when running the tests via the command line. Good stuff.
Here's another try.
Comment #9
rjacobs CreditAttribution: rjacobs commentedTrying to load the view as part of the test method itself....
Comment #11
rjacobs CreditAttribution: rjacobs commentedI have a theory that the view plugin my not be getting picked up because somehow the namespace is case sensitive in certain environments. I had a namespace (and directory structure) of Drupal\juicebox\Plugin\Views\Style, but I see that the core views module uses [...]\Plugin\views\style for it's own plugins. Here's a patch with a switch.
Could that be it? I'm guessing maybe a 10% chance it's that simple.
Comment #12
rjacobs CreditAttribution: rjacobs commentedHa Ha hahha hahhah HA. Bloody case sensitive, and so the problem only showed up on environments with case sensitive file systems (apparently the testbot environment is one such example). I'm still not too clear on why views cares exactly where my style plugin class is located, as I thought the annotation on the class was enough to identify it independent of its directory location. Why should views care if the plugin is in Drupal\juicebox\Plugin\Views\Style or Drupal\juicebox\Plugin\views\style? As long as the case on the directory and the namespace align (which they did) I would assume it would have worked. Apparently not. I need a drink.
Comment #13
rjacobs CreditAttribution: rjacobs commentedAnd now with some assertions to test. This is still not complete though.
Comment #14
rjacobs CreditAttribution: rjacobs commentedI broke out the craziness about the case sensitive namespace directory into #2632946: Views style plugin needs to be nested in the existing namepsace directoy in a case sensitive way. That change will be easier to track separately in the history.
Comment #15
rjacobs CreditAttribution: rjacobs commentedOk, now here's a fully ported set of test methods and related supporting tweaks.
Comment #17
rjacobs CreditAttribution: rjacobs commentedOk, committed.