Updated tests to generate user config

This commit is contained in:
Matthew Barbour 2019-06-27 20:02:21 -05:00 committed by matthew
parent b2193cb6f1
commit 3560a19f79

View file

@ -16,6 +16,9 @@ if (is_null(User::by_name("demo"))) {
$userPage->onUserCreation(new UserCreationEvent("test", "test", ""));
}
global $user;
send_event(new InitUserConfigEvent($user));
abstract class ShimmiePHPUnitTestCase extends \PHPUnit\Framework\TestCase
{
private $images = [];
@ -132,6 +135,7 @@ abstract class ShimmiePHPUnitTestCase extends \PHPUnit\Framework\TestCase
{
global $user;
$user = User::by_name('demo');
send_event(new InitUserConfigEvent($user));
$this->assertNotNull($user);
}
@ -139,6 +143,7 @@ abstract class ShimmiePHPUnitTestCase extends \PHPUnit\Framework\TestCase
{
global $user;
$user = User::by_name('test');
send_event(new InitUserConfigEvent($user));
$this->assertNotNull($user);
}