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.
Here's an easy one to start.
Comment | File | Size | Author |
---|---|---|---|
#8 | drupal-graph_phpunit-1935908-8.patch | 8.07 KB | ParisLiakos |
#4 | drupal-graph_phpunit-1935908-4.patch | 8.08 KB | ParisLiakos |
graph-phpunit.patch | 4.25 KB | msonnabaum | |
Comments
Comment #1
franskuipers CreditAttribution: franskuipers commentedI feel its awesome we have phpunit tests in core!
the getInfo function is not relevant in phpunit tests anymore?
add one or more @group annotations here. I am thinking of somthing like:
Comment #2
clemens.tolboom@msonnabaum: Why is the unit test moved? Is there some documentation about this?
See also #1938068: Convert UnitTestBase to PHPUnit
Comment #3
ParisLiakos CreditAttribution: ParisLiakos commentedTagging
Besides
Should be
Contains \Drupal\Tests...
this seems ready
Comment #4
ParisLiakos CreditAttribution: ParisLiakos commentedComment #6
ParisLiakos CreditAttribution: ParisLiakos commented#4: drupal-graph_phpunit-1935908-4.patch queued for re-testing.
Comment #8
ParisLiakos CreditAttribution: ParisLiakos commented/me facepalms
Comment #9
clemens.tolboom@ParisLiakos for future references: do you have some documentation to add in #1938068: Convert UnitTestBase to PHPUnit as most people will be puzzled how to create a patch for a git mv, replace t() by sprintf, etc ... btw: I should have documented that myself :-/
Shouldn't this be removed as mentioned by @franskuipers in #1?
And what about his
@group Component
Comment #10
ParisLiakos CreditAttribution: ParisLiakos commentedNo, we still need it for Simpletest UI ;)
And there is no Component group, so far groups refer to a module, but definitely we should come up with a standard
Comment #11
clemens.tolboomThen the patch looks ok to me :)
Comment #12
alexpottThere is a clear case for using data providers in these tests
Comment #13
clemens.tolboomSo we need to follow along http://phpunit.de/manual/current/en/writing-tests-for-phpunit.html#writi... mentioned in #1938068: Convert UnitTestBase to PHPUnit
Comment #14
msonnabaum CreditAttribution: msonnabaum commentedI'm not sure I see how data providers could be used here.
Comment #15
jhedstromI also don't see a clear place to use dataproviders here.
Comment #16
alexpottYep... I saw arrays of stuff and foreach loops with assertions in... and assumed... if some rtbcs I'll commit.
Comment #17
jhedstromMoving back to RTBC as per #16.
Comment #18
alexpottCommitted c43d648 and pushed to 8.x. Thanks!
Comment #20
jhedstrom