Updated tests to generate user config
This commit is contained in:
parent
73b784266e
commit
761834b6fa
1 changed files with 3 additions and 0 deletions
|
@ -133,6 +133,7 @@ abstract class ShimmiePHPUnitTestCase extends \PHPUnit\Framework\TestCase
|
||||||
global $user;
|
global $user;
|
||||||
$user = User::by_name('demo');
|
$user = User::by_name('demo');
|
||||||
$this->assertNotNull($user);
|
$this->assertNotNull($user);
|
||||||
|
send_event(new InitUserConfigEvent($user));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function log_in_as_user()
|
protected function log_in_as_user()
|
||||||
|
@ -140,6 +141,7 @@ abstract class ShimmiePHPUnitTestCase extends \PHPUnit\Framework\TestCase
|
||||||
global $user;
|
global $user;
|
||||||
$user = User::by_name('test');
|
$user = User::by_name('test');
|
||||||
$this->assertNotNull($user);
|
$this->assertNotNull($user);
|
||||||
|
send_event(new InitUserConfigEvent($user));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function log_out()
|
protected function log_out()
|
||||||
|
@ -147,6 +149,7 @@ abstract class ShimmiePHPUnitTestCase extends \PHPUnit\Framework\TestCase
|
||||||
global $user, $config;
|
global $user, $config;
|
||||||
$user = User::by_id($config->get_int("anon_id", 0));
|
$user = User::by_id($config->get_int("anon_id", 0));
|
||||||
$this->assertNotNull($user);
|
$this->assertNotNull($user);
|
||||||
|
send_event(new InitUserConfigEvent($user));
|
||||||
}
|
}
|
||||||
|
|
||||||
// post things
|
// post things
|
||||||
|
|
Reference in a new issue