Closed (fixed)
Project:
Chaos Tool Suite (ctools)
Version:
8.x-3.x-dev
Component:
Plugins system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
6 Mar 2017 at 13:10 UTC
Updated:
18 Apr 2017 at 11:36 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
damienmckennaAll work is by EclipseGc and phenaproxima.
Comment #3
phenaproximaThis bit was actually done entirely by EclipseGc; I can claim no credit here.
Comment #4
phenaproximaComment #5
darrenwh commentedAlso can a test be added for this?
Comment #6
darrenwh commentedNeeds a @file comment
Also can a test be added for this?
Comment #7
damienmckennaAdded some comments.
Comment #8
damienmckennaStill needs tests.
Comment #9
phenaproximaOkay, here's a simple test that should pretty much cover the reason why @EclipseGc wrote this class in the first place. I merged @Damien McKenna's changes in #7 into this too.
Comment #10
phenaproximaI'd like @EclipseGc to sign off on that test before this gets RTBCed or committed, though.
Comment #11
damienmckennaTest-only.
Comment #12
eclipsegc commentedNot certain the test is really doing anything testy yet. We should be serializing the tempstore object in the test and unserializing it and then ensuring we have known values from a service. It's important to note, there are services already passed to a tempstore object. The whole reason this patch even exists is because Drupal can add unserializable requests to the request stack, and tempstore was blowing up in those instances. The requestStack property isn't even accessible on tempstore objects, so you'll need to reflect the value back out of that. I don't think any values need to be set on the tempstore itself, it already has the stuff that will be problematic as a property of the object.
Eclipse
Comment #13
eclipsegc commentedoops
Comment #14
phenaproximaOkay, here we go. This should be asserting everything correctly.
Comment #16
phenaproximaDerp -- I did a little more experimenting and discovered that mocking __sleep() doesn't actually prove anything at all because it doesn't throw the LogicException (go figure). So I rewrote the mocked request using Prophecy and implementing \Serializable, which means that calling serialize() on the mocked request now definitely throws the exception.
Comment #18
phenaproximaBullsh*t. There is a @group annotation in the test. Right there at the top. This is Drupal CI being wonky.
Comment #20
eclipsegc commentedNoticed that the test class name and file name had a capitalization difference. Let's see if the test passes now.
Eclipse
Comment #21
eclipsegc commented*sigh* me and the status field...
Comment #24
eclipsegc commentedOk, passes tests now.
Fixed
Comment #26
darrenwh commentedSo assume there is no point in doing code reviews if you don't get any credit?