Closed (fixed)
Project:
Storm
Version:
6.x-1.x-dev
Component:
Storm Team
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
21 Sep 2010 at 22:32 UTC
Updated:
13 Feb 2011 at 19:00 UTC
Jump to comment: Most recent file
We need tests for Storm Team
| Comment | File | Size | Author |
|---|---|---|---|
| #27 | storm_test.patch | 3.88 KB | rjgoldsborough |
| #24 | storm_test.patch | 5.58 KB | rjgoldsborough |
| #22 | storm_team_simpletest.patch | 5.58 KB | rjgoldsborough |
| #20 | storm_team_simple_test.patch | 5.67 KB | rjgoldsborough |
| #16 | storm_team_simple_test.patch | 23.63 KB | rjgoldsborough |
Comments
Comment #1
rjgoldsborough commentedThis one is just a simple test that creates a team. I can write some more that would create a person first, and/or an organization.
Also, this test passes some, fails none, but has some exceptions. I haven't really been able to track down the problems. I am going to keep digging but was hoping to maybe get some more insight on the exceptions.
Comment #3
juliangb commentedThe exceptions are PHP notices. You would notice these on an actual installation if you had error reporting set to the maximum.
Comment #4
rjgoldsborough commentedYeah, I see them, but some of the errors seem to be untrue.
Comment #5
juliangb commentedWhich errors seem untrue?
If you'd be keen to work on this, would it be possible to post a patch fixing those errors that you can see, and then we can look at what is left?
Comment #6
rjgoldsborough commentedThere are multiple "trying to get a property from a non-object", but the line or variable in question seems to be an object.
Comment #7
juliangb commentedThis generally means that the object has not been set yet, or that the code is trying to read from a variable within the object that has not been set.
I usually work around this by running an
if(isset($object->variable))orisset($object->variable) ? $object->variable : [insert default value here]Comment #8
rjgoldsborough commentedAhh good idea. Yeah, I had assumed they weren't being declared correctly before they were needed. Thanks, and I'll dig back into this.
Comment #9
rjgoldsborough commentedFigured out the errors. Patch coming soon.
Comment #10
rjgoldsborough commentedOk. So after fixing all the initial errors, I seem to have found some more, but I wanted to go ahead and post this patch as it does clear up quite a bit of PHP notices.
Comment #12
rjgoldsborough commented#10: storm_team_simple_test.patch queued for re-testing.
Comment #13
rjgoldsborough commentedTry again?
Comment #15
rjgoldsborough commentedOk, that's what should have happened. Got it down to about 4 exceptions from 10 so another patch should be coming soon.
Comment #16
rjgoldsborough commentedOK. After some digging and testing, I think I have this test working and all the bugs fixed.
Comment #17
rjgoldsborough commentedForgot again...
Comment #18
juliangb commentedHow about here we call _stormperson_user_load(...) to remove duplication?
This can be more simply done as:
Should this be
if (isset($additions->members))?Trailing whitespace.
Trailing whitespace.
This hunk shouldn't be in the patch.
Powered by Dreditor.
Comment #19
juliangb commentedComment #20
rjgoldsborough commentedCleaned up the previous patch with the mentioned points.
Comment #21
juliangb commentedThanks for the updated patch. A couple of comments:
We could simplify this section by calling _stormperson_user_load(...)
Just to clarify why this is now $variable rather than $node->$variable?
Trailing whitespace. Not introduced by this patch, but good to remove.
Powered by Dreditor.
Comment #22
rjgoldsborough commentedAlrighty. After a few busy weeks, here's an updated patch that I think should do the trick. Simplified the user load and fixed that variable. I'm not sure why I changed it. Heh. Also removed that whitespace and it passes all the tests.
Comment #24
rjgoldsborough commentedLet's try this one.
Comment #25
rjgoldsborough commentedMy bad. Didn't apply to right version. Fixing now.
Comment #27
rjgoldsborough commentedAlright, well it looks the storm person module was updated to fix the two changes that were needed for this patch.
Comment #28
juliangb commentedPatch looks fine, but I just noticed that this is testing against 1.x rather than 2.x. Needs a retest against 2.x first as that is where it will initially be committed to.
Comment #29
juliangb commented#27: storm_test.patch queued for re-testing.
Comment #30
juliangb commentedGreat, still passes.
Comment #31
juliangb commentedCommitted to 2.x
Comment #32
juliangb commentedCommitted to 1.x