донат шоп, управление магазином, яндекс метрика

This commit is contained in:
2026-07-19 19:17:29 +04:00
parent 8bf1b852f0
commit df7f98fe8b
48 changed files with 1859 additions and 18 deletions
@@ -56,6 +56,29 @@ class GameAccountRegistrationTest extends TestCase
$response->assertSessionHasErrors(['username', 'email', 'invite_code', 'password', 'terms']);
}
public function test_registration_without_invite_when_requirement_is_disabled(): void
{
config(['moonwell.registration.require_invite_code' => false]);
$this->mock(InviteCodeService::class, function (MockInterface $mock): void {
$mock->shouldNotReceive('redeemForRegistration');
});
$this->mock(AzerothCoreAccountRegistrar::class, function (MockInterface $mock): void {
$mock->shouldReceive('register')
->once()
->with('playerone', 'player@example.com', 'Pass1234')
->andReturn(['id' => 77, 'username' => 'PLAYERONE']);
});
$this->post(route('game-account.store'), [
'username' => 'playerone',
'email' => 'player@example.com',
'password' => 'Pass1234',
'password_confirmation' => 'Pass1234',
'terms' => '1',
])->assertSessionHas('registration_success');
}
public function test_duplicate_username_is_reported_back_to_the_form(): void
{
$this->mock(InviteCodeService::class, function (MockInterface $mock): void {