public function CourseTestCase::setUp in Course 6
Same name and namespace in other branches
- 7.2 tests/CourseTestCase.test \CourseTestCase::setUp()
- 7 tests/CourseTestCase.test \CourseTestCase::setUp()
Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix. A temporary files directory is created with the same name as the database prefix.
Parameters
...: List of modules to enable for the duration of the test. This can be either a single array or a variable number of string arguments.
Overrides DrupalWebTestCase::setUp
5 calls to CourseTestCase::setUp()
- CourseObjectBookTestCase::setUp in modules/
course_book/ course_book.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- CourseObjectQuizTestCase::setUp in modules/
course_quiz/ course_quiz.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- CourseObjectSignupTestCase::setUp in modules/
course_signup/ course_signup.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- CourseObjectUbercartTestCase::setUp in modules/
course_uc/ course_uc.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- CourseObjectWebformTestCase::setUp in modules/
course_webform/ course_webform.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
5 methods override CourseTestCase::setUp()
- CourseObjectBookTestCase::setUp in modules/
course_book/ course_book.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- CourseObjectQuizTestCase::setUp in modules/
course_quiz/ course_quiz.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- CourseObjectSignupTestCase::setUp in modules/
course_signup/ course_signup.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- CourseObjectUbercartTestCase::setUp in modules/
course_uc/ course_uc.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
- CourseObjectWebformTestCase::setUp in modules/
course_webform/ course_webform.test - Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
File
- tests/
CourseTestCase.test, line 8
Class
- CourseTestCase
- Master class for Course tests.
Code
public function setUp() {
$deps = $this
->getModules();
call_user_func_array(array(
'parent',
'setUp',
), $deps);
$this->admin_user = $this
->drupalCreateUser(array(
'administer nodes',
'edit courses',
));
$this->student_user = $this
->drupalCreateUser(array(
'access content',
));
$this
->drupalLogin($this->admin_user);
// Flush handlers (because we created this one on the fly).
course_get_handlers(NULL, TRUE);
// Flush autoload. Fixes some issues with late declaration of classes.
autoload_flush_caches();
}