Re: Simpletest Conundrum

Darren Oh <[email protected]> Mon, 1 Dec 2014 14:44:12 -0500
Newsgroups gmane.comp.php.drupal.devel
Message-ID <[email protected]>
--Apple-Mail=_61FE14ED-E121-47E4-9D4E-47D808DDE985
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Standard practice is to create a hidden test module. =
https://www.drupal.org/node/302577

On Dec 1, 2014, at 2:19 PM, Jeff Greenberg wrote:

> In Drupal 7, I have a requirement to simpletest a functional group of =
methods... one test comprised of about 1800 subtest permutations.=20
>=20
> The issue I have is that these are back-end functions with no UI =
interaction, yet simpletest unit test, from what I read, does not =
provide the functionality for accessing the db, creating test tables and =
data, etc.
>=20
> Do I fudge it by having a menu callback, or by having an admin page =
with a button if necessary, so that I can webtest, or do I manually =
include db.inc, etc. so that I can access the db, (though I think it =
would need to be much dirtier than that)?


--Apple-Mail=_61FE14ED-E121-47E4-9D4E-47D808DDE985
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " =
class=3D""><div class=3D"">Standard practice is to create a hidden test =
module.&nbsp;<a =
href=3D"https://www.drupal.org/node/302577">https://www.drupal.org/node/30=
2577</a></div><br class=3D""><div><div class=3D"">On Dec 1, 2014, at =
2:19 PM, Jeff Greenberg wrote:</div><br =
class=3D"Apple-interchange-newline"><blockquote type=3D"cite"><span =
style=3D"border-collapse: separate; font-family: Helvetica; font-style: =
normal; font-variant: normal; font-weight: normal; letter-spacing: =
normal; line-height: normal; orphans: 2; text-align: -webkit-auto; =
text-indent: 0px; text-transform: none; white-space: normal; widows: 2; =
word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; =
-webkit-border-vertical-spacing: 0px; =
-webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
auto; -webkit-text-stroke-width: 0px; font-size: medium; " =
class=3D"Apple-style-span">In Drupal 7, I have a requirement to =
simpletest a functional group of methods... one test comprised of about =
1800 subtest permutations.&nbsp;<div class=3D""><br class=3D""></div><div =
class=3D"">The issue I have is that these are back-end functions with no =
UI interaction, yet simpletest unit test, from what I read, does not =
provide the functionality for accessing the db, creating test tables and =
data, etc.</div><div class=3D""><br class=3D""></div><div class=3D"">Do =
I fudge it by having a menu callback, or by having an admin page with a =
button if necessary, so that I can webtest, or do I manually include =
db.inc, etc. so that I can access the db, (though I think it would need =
to be much dirtier than that)?</div></span></blockquote></div><br =
class=3D""></body></html>=

--Apple-Mail=_61FE14ED-E121-47E4-9D4E-47D808DDE985--