Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rjacobs created an issue. See original summary.

rjacobs’s picture

Status: Active » Needs review
FileSize
12.94 KB

Here's a base skeleton for the test. This is just a start, there are no assertions in place yet.

Status: Needs review » Needs work

The last submitted patch, 2: juicebox-views_test_skelton-2586125-2.patch, failed testing.

rjacobs’s picture

Here'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).

Status: Needs review » Needs work

The last submitted patch, 4: juicebox-views_test_skelton-2586125-3.patch, failed testing.

The last submitted patch, 4: juicebox-views_test_skelton-2586125-3.patch, failed testing.

rjacobs’s picture

Well 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.

Status: Needs review » Needs work

The last submitted patch, 7: juicebox-views_test_skelton-2586125-7.patch, failed testing.

rjacobs’s picture

Status: Needs work » Needs review
FileSize
31.24 KB

Trying to load the view as part of the test method itself....

Status: Needs review » Needs work

The last submitted patch, 9: juicebox-views_test_skelton-2586125-9.patch, failed testing.

rjacobs’s picture

Status: Needs work » Needs review
FileSize
74.97 KB

I 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.

rjacobs’s picture

Status: Needs review » Active

Ha 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.

rjacobs’s picture

Status: Active » Needs review
FileSize
77.99 KB

And now with some assertions to test. This is still not complete though.

rjacobs’s picture

I 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.

rjacobs’s picture

Ok, now here's a fully ported set of test methods and related supporting tweaks.

  • rjacobs committed da4b675 on 8.x-2.x
    Issue #2586125 by rjacobs: Finalize test coverage for view style plugin...
rjacobs’s picture

Status: Needs review » Fixed

Ok, committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.