public function RecommenderTestCase::setUp in Recommender API 6.3
Same name and namespace in other branches
- 6.2 recommender.test \RecommenderTestCase::setUp()
- 7.3 recommender.test \RecommenderTestCase::setUp()
- 7.4 recommender.test \RecommenderTestCase::setUp()
- 7.5 recommender.test \RecommenderTestCase::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
File
- ./
recommender.test, line 13
Class
Code
public function setUp() {
//parent::setUp('recommender', 'async_command');
parent::setUp('recommender');
// grouplens data, (Resnick et al, 1994)
db_truncate('recommender_preference_staging');
db_query("INSERT INTO {recommender_preference_staging}(source_eid, target_eid, score) VALUES\n (1,1,1),(1,2,5),(1,4,2),(1,5,4),\n (2,1,4),(2,2,2),(2,4,5),(2,5,1),(2,6,2),\n (3,1,2),(3,2,4),(3,3,3),(3,6,5),\n (4,1,2),(4,2,4),(4,4,5),(4,5,1)");
recommender_app_register($this
->getApps());
}