1 simpletest_example.test | public SimpleTestUnitTestExampleTestCase::setUp() |
Set up the test environment.
Note that we use backdrop_load() instead of passing our module dependency to parent::setUp(). That's because we're using BackdropUnitTestCase, and thus we don't want to install the module, only load its code.
Also, BackdropUnitTestCase can't actually install modules. This is by design.
Overrides BackdropUnitTestCase::setUp
File
- modules/
examples/ simpletest_example/ tests/ simpletest_example.test, line 130 - An example of simpletest tests.
Class
- SimpleTestUnitTestExampleTestCase
- Although most core test cases are based on BackdropWebTestCase and are functional tests (exercising the web UI) we also have BackdropUnitTestCase, which executes much faster because a Backdrop install does not have to be one. No environment is…
Code
public function setUp() {
backdrop_load('module', 'simpletest_example');
parent::setUp();
}