From 5b9107339a3e826fb3374b3818a775e915970d6e Mon Sep 17 00:00:00 2001 From: jgen Date: Wed, 19 Feb 2014 02:39:13 -0500 Subject: [PATCH] Let's just do it directly. --- tests/all_tests.php | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/tests/all_tests.php b/tests/all_tests.php index a679fa3e..b438ec1c 100644 --- a/tests/all_tests.php +++ b/tests/all_tests.php @@ -45,23 +45,25 @@ foreach(_get_themelet_files(get_theme()) as $themelet) { _load_extensions(); +// Create the necessary users for the tests. + +$userPage = new UserPage(); +$userPage->onUserCreation(new UserCreationEvent("demo", "demo", "")); +$database->commit(); // Need to commit the new user to the database. + +$database->beginTransaction(); + +$userPage->onUserCreation(new UserCreationEvent("test", "test", "")); +$database->commit(); // Need to commit the new user to the database. + +$database->beginTransaction(); + +// Continue + $page = class_exists("CustomPage") ? new CustomPage() : new Page(); $user = _get_user(); send_event(new InitExtEvent()); -// Create the necessary users for the tests. - -send_event(new UserCreationEvent("demo", "demo", "")); -$database->commit(); // Need to commit the new user to the database. - -$database->beginTransaction(); - -send_event(new UserCreationEvent("test", "test", "")); -$database->commit(); // Need to commit the new user to the database. - - -$database->beginTransaction(); - // Now we can run all the tests. $all = new TestFinder(""); $results = $all->run(new TextReporter());