From 6bc9315955a03dfc1bab0056e69fc707c6ea1595 Mon Sep 17 00:00:00 2001 From: jgen Date: Wed, 19 Feb 2014 01:32:51 -0500 Subject: [PATCH] Need to commit the new users to the database. --- tests/all_tests.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/all_tests.php b/tests/all_tests.php index 449e8bea..a0a5d0ca 100644 --- a/tests/all_tests.php +++ b/tests/all_tests.php @@ -8,7 +8,6 @@ * @copyright Copyright (c) 2014, jgen */ -//require_once('lib/simpletest/autorun.php'); require_once('lib/simpletest/unit_tester.php'); require_once('lib/simpletest/web_tester.php'); require_once('lib/simpletest/reporter.php'); @@ -51,12 +50,19 @@ $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. + send_event(new UserCreationEvent("test", "test", "")); +$database->commit(); // Need to commit the new user to the database. -// Run all the tests + +// Now we can run all the tests. $all = new TestFinder(""); -$all->run(new TextReporter()); +$results = $all->run(new TextReporter()); -// Is this really needed? +// At this point this isn't really necessary as the test machines are stateless. $database->commit(); + +exit ($results ? 0 : 1);