Closed (fixed)
Project:
Drupal core
Version:
8.4.x-dev
Component:
rest.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
29 Jul 2016 at 15:31 UTC
Updated:
21 Aug 2017 at 08:25 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
xjmGoing forward, let's please stop doing individual module conversions and do larger chunks at once. See #2770921: Feb 21st: Convert chunk of WTB to BTB by just moving classes, changing use statements adding traits and https://www.drupal.org/core/scope#incomplete.
Comment #3
michielnugter commentedThere are still WebTests in rest after the big bang, reopening the issue.
Comment #4
wim leersYou're right, in the deprecated
\Drupal\rest\Tests\RESTTestBaseand its subclasses.Comment #5
lendudeTook a quick look at
\Drupal\rest\Tests\ResourceTestbut that will require more then a quick look :)Updated the IS to set some scope on this conversion
Comment #6
dawehnerI'm wondering whether this case is the chance for us to provide a ApiTestBase, aka. something which provides methods like:
$this->request()On the other hand I believe we should just convert the test over, given that we have a MUCH better test coverage in phpunit already.
Comment #7
michielnugter commentedComment #8
wim leers#2863267: Convert web tests of views landed.
Here's a start.
Comment #9
wim leersComment #10
wim leersNow the IS reflects the actual scope & status.
Comment #11
wim leersAlso doing
StyleSerializerTest. Just one last failure…Comment #12
dawehnerStyleSerializerTestThat test takes sooooooooooo much time.Comment #13
wim leersCompleted
StyleSerializerTest.Now working on the last one.
Comment #14
wim leersThis should be green.
Comment #15
michielnugter commentedDid a quick code review and it looks good! Haven't found anything yet.
I think it's a good thing base classes are dropped. It does make the test a little less magical.
Comment #16
wim leers#15, that, and
RESTTestBaseis already deprecated anyway:Comment #17
naveenvalechaShall we also convert the RESTTestBase dependent tests also as the part of this and close this one as duplicate #2889882: Convert ResponseGeneratorTest, DbLogResourceTest, RestRegisterUserTest to BTB
Comment #18
wim leersNo, I'd rather get this in separately — that'd mean progress! I think #2889882: Convert ResponseGeneratorTest, DbLogResourceTest, RestRegisterUserTest to BTB will be a bit more painful.
Comment #19
wim leersComment #20
naveenvalechaLet's move the new tests to their namespace. Changes look good on local.
#18, That's fine. Removed ResourceTest from here #2889882: Convert ResponseGeneratorTest, DbLogResourceTest, RestRegisterUserTest to BTB
//Naveen
Comment #21
wim leers+1
So… is this then RTBC? (@naveenvalecha, just moving files doesn't mean you can't RTBC anymore.)
Comment #22
michielnugter commentedDid another review pass, everything looks good. Setting to RTBC!
Comment #23
naveenvalechaRTBC +1
#16 +1 It's good to leave deprecated RESTTestBase where it is. Let's RESTTestBase child classes(ResponseGeneratorTest, DbLogResourceTest, RestRegisterUserTest) use the BTB directly.
//Naveen
Comment #24
dawehnerI agree, we have followed that strategy in multiple places.
These constants are nice!
These are two instances where we switched to use
assertSame, but we have the wrong order. Let's not introduce a small regression here.Comment #25
wim leersFixed #24.2.
Comment #26
dawehnerThank you @Wim Leers!
Comment #29
catchCommitted/pushed to 8.5.x and cherry-picked to 8.4.x. Thanks!
Comment #31
wim leers🎉