Closed (fixed)
Project:
Drupal core
Version:
8.6.x-dev
Component:
system.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Mar 2017 at 15:54 UTC
Updated:
22 Jul 2018 at 20:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jofitzMoved all 8 files.
Corrected namespace.
Updated references.
Comment #4
michielnugter commentedComment #5
berdirI'd say this is system module since the tests live the there. Wondering if tests in system.module should instead be moved to core/tests instead, we only had them in system.module because that was the only place they could be before..
Some hints on fixing the tests
* I think instead of setRawContent(), you want to use assertContains() or similar assertions on the string that you have.
* assertNoCacheTag() and assertCacheTag() should possibly be copied into some cache asserts trait?
* settingsSet(): Looks like we have no replacement for that yet in browser test base, \Drupal\Tests\system\Functional\System\SitesDirectoryHardeningTest::testSitesDirectoryHardeningConfig() inlines it, but we do have \Drupal\KernelTests\KernelTestBase::setSetting(), maybe that could move into common trait or something.
* assertNoPattern() is in AssertContentTrait
* assertCacheContext() is in \Drupal\system\Tests\Cache\AssertPageCacheContextsAndTagsTrait, sounds like a nice place for assertCacheTag methods above?
Not sure what to do with Drupal\Tests\system\Functional\Common\SimpleTestErrorCollectorTest::testErrorCollect(). That's actually a simpletest test, so we might not want to remove that until we remove simpletest and instead copy it to be able to test the same with BrowserTestBase if necessary, which might look quite different.
Comment #8
dawehnerNote: #2955690: Move Common tests in system.module to BTB contains a bunch of tests which just required a 1to1 movement
Comment #9
lendudeComment #10
lendudeHere we go, no interdiff, because this is quite different then the moves from #2
setSettingwas doing, since the settings were never used, just set up in setUp(), so just removed that (am I overlooking something?).Comment #12
dawehnerThis is not longer needed as #2795601: Convert \Drupal\Tests\system\Functional\Common\FormatDateTest mostly to a kernel test moved almost everything over
Is there a reason we are not just using
$this->render()?Comment #13
lendude@dawehner++
12.1 removed a whole bunch of stuff
12.2 nope, no reason other then me forgetting that that is a thing :)
Also fixed the namespace for the moved simpletest (duh)
Comment #14
borisson_This looks very good, great work! I have no suggestions or nits to pick.
Comment #15
alexpottUpdating issue credit
Comment #16
alexpottCommitted 17da127 and pushed to 8.6.x. Thanks!
Fixing unused use on commit.