This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.
If you want to speed up Drupal Simpletest bootstrap a simple trick is to use the live database instead of the sandbox enviroment created by Simpletest. To do this simply override setUp and tearDown methods as reported below: <? php class SampleTest extends DrupalWebTestCase { function setUp () { $this -> setup = TRUE ; } function tearDown () { } //Your test here... Please note now you are using…
If you want to speed up Drupal Simpletest bootstrap a simple trick is to use the live database instead of the sandbox enviroment created by Simpletest.
To do this simply override setUp and tearDown methods as reported below:
<?php
class SampleTest extends DrupalWebTestCase {
function setUp() {
$this->setup = TRUE;
}
function tearDown() {
}
//Your test here...
Please note now you are using the live database… so eventual fake contents created by unit tests must be removed manually.
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.