create test users individually
This commit is contained in:
parent
88b592c6ef
commit
5dab234630
1 changed files with 9 additions and 4 deletions
|
@ -10,12 +10,17 @@ $_SERVER['QUERY_STRING'] = '/';
|
|||
chdir(dirname(dirname(__FILE__)));
|
||||
require_once "core/_bootstrap.php";
|
||||
|
||||
if (is_null(User::by_name("demo"))) {
|
||||
$userPage = new UserPage();
|
||||
$userPage->onUserCreation(new UserCreationEvent("demo", "demo", ""));
|
||||
$userPage->onUserCreation(new UserCreationEvent("test", "test", ""));
|
||||
function create_user(string $name) {
|
||||
if (is_null(User::by_name($name))) {
|
||||
$userPage = new UserPage();
|
||||
$userPage->onUserCreation(new UserCreationEvent($name, $name, ""));
|
||||
assert(!is_null(User::by_name($name)), "Creation of user $name failed");
|
||||
}
|
||||
}
|
||||
|
||||
create_user("demo");
|
||||
create_user("test");
|
||||
|
||||
abstract class ShimmiePHPUnitTestCase extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
private $images = [];
|
||||
|
|
Reference in a new issue