szurubooru/tests/Mockers/UserMocker.php
2014-05-13 21:10:37 +02:00

12 lines
299 B
PHP

<?php
class UserMocker extends AbstractMocker implements IMocker
{
public function mockSingle()
{
$user = UserModel::spawn();
$user->setAccessRank(new AccessRank(AccessRank::Registered));
$user->setName('dummy'.uniqid());
$user->setPassword('sekai');
return UserModel::save($user);
}
}