Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
simpletest.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Apr 2014 at 18:48 UTC
Updated:
29 Jul 2014 at 23:31 UTC
Jump to comment: Most recent
Comments
Comment #1
sunAll changes go into the development version first.
I was actually considering to remove all of these hooks, because I cannot really see a use-case for them...
For that simpletest_turbo use-case, I think that a hook is not the right architecture. You should rather introduce a custom base test class, and make tests explicitly extend that. — Otherwise, it wouldn't be guaranteed that the test environment works as expected and is identical to WebTestBase.
Comment #2
alberto56 commented@sun thanks for your reply.
If I provide a custom base class as suggested, my setUp() function needs some way of knowing if it's the first time it is called or not, within a test run. I have not found a way of doing this: static functions, session variables, the cache: everything is reset between calls to a parent's setUp() from subclasses.
That is why i came to the conclusion that I needed some way of knowing when my test run (which can contain several test cases) begins and ends: a hook system is the only way I can think of.
Cheers,
Albert.
Comment #3
alberto56 commentedSetting as a duplicate of #2234479: Deprecate hook_test_* hooks in simpletest.