Closed (duplicate)
Project:
Drupal core
Version:
8.6.x-dev
Component:
simpletest.module
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
23 Dec 2009 at 22:44 UTC
Updated:
26 Jan 2019 at 16:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
boombatower commentedI tested the code by modifying my default installation to include the contact module enable and visible for anonymous users. This should fail if you do not have that setup.
Since we don't have any sort of pre-configured drupal (other than install profiles which SimpleTest already runs against) I am not sure how to easily test this in core. Short of have a webtestcase that launches a clone test after modifying the temp db, but I am not sure that we want to mess with all that.
Comment #2
boombatower commentedRemoved unnecessary global $db_prefix;
Comment #4
dave reidMy bad.
Comment #8
boombatower commentedRe-roll for temp directory patch.
Comment #10
boombatower commentedShould be simple fix.
Comment #11
boombatower commentedDetermined that this will work best if host db is cloned and is simplest to explain and such.
Comment #12
boombatower commentedRe-roll for core changes.
Comment #13
boombatower commentedRe-roll.
Comment #14
sunWhat can we do to allow tests to extend this list easily without having to entirely replace it?
Powered by Dreditor.
Comment #15
boombatower commentedComment #16
sunWell then ;)
Those changes partially overlap and conflict with #347959: modules_installed is broken during testing, but someone would have to re-roll one of both either way (and the other isn't working yet).
Comment #17
boombatower commented#13: 666956-drupalclonetestcase.patch queued for re-testing.
Retesting to make sure it still applies and passes.
Comment #19
boombatower commentedRe-rolling is getting old.
Comment #20
boombatower commentedSpacing was off in last patch.
Comment #21
webchickThis definitely seems useful, but if it's available in contrib, it's a new feature for D7's SimpleTest module, and we're almost 6 months since feature freeze, why exactly is this being pushed now?
Comment #22
boombatower commentedRe-roll.
Comment #23
sun@webchick: If people are able to write tests for their own, custom sites, this will lead to more contributors who are familiar with the testing framework. In turn, we'll see many more contributors that already know how to write tests, and therefore, bug reports can be resolved more quickly. Hence, committing this would be beneficial for overall Drupal development.
Some comments in this patch need some love though.
Comment #24
boombatower commentedAlso note the related #758662: Add staging test case. Using this I was able to run a test against drupal.org staging servers!! Fairly useful eh?
Comment #25
boombatower commentedRe-roll.
Comment #26
dave reidConsidering that core doesn't take advantage of this, I don't see how it would be useful to provide in core. I'd be fine with it being in a simpletest 7.x-2.x drop-in contrib replacement for core.
Comment #27
boombatower commentedFixed.
Comment #28
rfaySubscribe. Is there a movement to do this in contrib? Will Simpletest Clone become a D7 contrib project as well?
Comment #29
boombatower commentedOnce I get my life back under control...I want to start up SimpleTest 7.x-2.x which I would like to include this and prep for SimpleTest 8.x.
Comment #30
boombatower commentedPlease note #29 is now active and is much improved over this version.
Comment #31
rfaySo Simpletest module in contrib now has a 7.x-2.x branch, which includes DrupalCloneTestCase. That's excellent. There is a 7.x-2.x dev release as well. (That was just me re-parsing #30)
Comment #32
boombatower commentedYep, and I have an external git repository that I use to merge with HEAD on a regular basis so it is kept up-to-date.
Comment #33
pwolanin commented@boombatower - does it make sense to duplicate the whole thing?
It seems like one could just subclass the core class to provided the needed facility as long as your willing to suffer a little code duplication.
Comment #34
Anonymous (not verified) commentedsubscribe.
Comment #35
boombatower commented@pwolanin: Not sure what are referring to. As I mentioned above this has been implemented in contrib.
Comment #36
pwolanin commented@boombatower - it seems like this could be implemented as a class that extends and just replaces the setUp method?
Comment #37
boombatower commentedIt is
It just cleans up the setUp method to make it require less messing around which the remote test case also uses.
Comment #38
mojzis commented@boombatower there is a task about this to "Determine if an old patch is still relevant" in the Drupal office hours website. Since it was one of the last to solve, i did attempt to :) but from the discussion aboive i sort of dont understand whether you still think it would be better to have this in core ?
thanks :)
Comment #40
boombatower commentedThe DrupalCloneTestCase and the remote test case allow people to test configured websites with content and such which is necessary to do any sort of real end-to-end testing.
Comment #47
dawehnerThis is a duplicate of https://www.drupal.org/project/drupal/issues/2793445