Closed (outdated)
Project:
Drupal core
Version:
main
Component:
views.module
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
21 Feb 2015 at 12:30 UTC
Updated:
16 Apr 2026 at 17:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ottlik commentedottlik will be working on this issue as of Feb. 25, 2015.
Comment #2
ottlik commentedComment #3
harshil.maradiya commentedas per instruction test is moved to destination class
Comment #4
harshil.maradiya commentedComment #6
dawehner@ottlik @harshil.maradiya
It would be cool if you could read my issue summary, ... there I suggested to use a
@dataProviderQuick nitpick, there is a whitespace left here :)
Comment #7
harshil.maradiya commented@dawehner thank you so much
Now i have implemented patch using data provider
Comment #8
harshil.maradiya commentedComment #10
harshil.maradiya commentedFixing patch
Comment #11
harshil.maradiya commentedComment #13
ottlik commentedTried to apply patch, got errors:
"Patch does not apply", which I didn't understand.
"Looking for }", but AFAICT the brackets are balanced.
Whitespace errors which of course I could fix. :)
Thought I'd upload in hopes that you (harshil.maradiya and/or dawehner) might find it fixable.
Comment #15
ottlik commentedMoved a bracket. Checked syntax on phpcodechecker.com, which said syntax was ok.
Comment #17
dawehnerThank you for working on it!
Some suggestions for a better variable naming: $expected_splitted_string, $expected_operator, $input_string
Nitpicks: We do have the { at the end of the function line.
Nitpicks: trailing whitespace
Please don't change this here.
This @dataProvider has to move to the documentation of testBreakString itself to work.
Comment #18
harshil.maradiya commentedFixing test cases
Comment #19
harshil.maradiya commented@dawehner thanks for your comment i have fixed failure test as well as ur all comments
applying rite patch
Comment #20
harshil.maradiya commentedComment #22
dawehnerThere is still whitespace
In case you want to, feel free to convert it to use the short array syntax. IMHO this would be way better to read.
Comment #24
harshil.maradiya commented@dawehner
Thanks for the quick response but in my ide i am not able to see any any white space and would yu please help me out with why test cases are failing
Thanks & regards
Harshil Maradiya
Comment #25
ottlik commentedMoved "@dataProvider". Improved variable names. Moved opening function bracket.
Thanks for helping!
Comment #26
dawehnerJust curious about this change, do we really need it?
Comment #27
ottlik commentedNo need for that change at all. It crept in as I was rearranging the closing brackets. Failed to notice it in the diff file or I would have changed it back.
Comment #28
ottlik commentedEliminated the unnecessary change.
Comment #29
harshil.maradiya commentedComment #32
ottlik commentedAdded debug($handler) and debug($handler-operator), hoping to see what's going wrong with the tests. Anyone have any tips on debugging?
Comment #33
ottlik commentedComment #35
harshil.maradiya commentedWs trying to reproduce on local but tests are not running no clue why these tests are failing
Comment #36
dawehnerYou want to use $handler->value in the first assertEquals ... note: I would use a different variable name, maybe
$resultComment #37
ottlik commentedChanged $handler to $result, line 99, changed $handler to $result->value, line 100, and changed $handler->operator to $result->operator, line 101. Also removed debug lines.
Comment #39
dawehnerCool, now you just have to figure out the remaining 2 failures.
Comment #40
ottlik commentedChanged first assertEquals back to assertEqualValue, so changed $result->value back to $result, thinking that the fail was in the "(int)" tests. Can't imagine why I changed it in the first place, as the original had "assertEqualValue".
Comment #42
ottlik commentedMoved function assertEqualValue from HandlerTest.php to HandlerBaseTest.php.
Comment #44
ottlik commentedIncluded bootstrap.inc file so t function would be visible.
Comment #46
dawehnerBut was there an actual reason, why do you think we need it?
Comment #47
ottlik commentedChanged erroneous include line to a correct (I hope) require line so includes/bootstrap.inc can be found. Alternatively I could scrap the error message from the original assertEqualValue function.
@dawehner The fails were in one (if counting starts from 1) or both (if from 0) of the tests where the (int) cast was used, so I was thinking that assertEqualValue might have a slightly different criterion for equality than assertEquals. Otherwise the fails are pretty mysterious so far.
Comment #49
ottlik commentedHaving trouble figuring out the absolute path to the includes directory, so copied the "use" namespaces from the HandlerTest file to the HandlerBaseTest file, hoping that might do what is needed to make the t function definition visible.
Comment #51
ottlik commentedCopied the t() function definition and removed the "use" namespaces.
Comment #53
joshi.rohit100Removed fatal error.
Comment #55
joshi.rohit100PHP error is gone :)
Comment #56
harshil.maradiya commentedthanks for that but the test cases are still failing
Comment #58
dawehnerThis issue would still be nice to land as its "rc eligible"
Comment #59
geertvd commentedComment #60
dawehnerLet's just use non random values instead
Comment #61
geertvd commentedComment #62
dawehnerThis is still kinda random :)
Comment #63
geertvd commentedCan't come up with any original non-random values today :)
Comment #64
geertvd commentedempty patch
Comment #66
dawehnerThank you!
Comment #71
mradcliffeThis issue would make an API break, and needs to be re-evaluated.,
Comment #72
dawehnerMh, there is no base class we change. I don't see how this is an API break.
Comment #84
smustgrave commentedThank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #86
smustgrave commentedThis file has drupalGet() call which can't be done in unit tests so believe this is no longer valid. Am saving credit though.