This commit is contained in:
2026-10-03 14:33:08 +04:00
parent 6a73d760c4
commit 93a9442e1c
67 changed files with 941 additions and 698 deletions
@@ -3,7 +3,7 @@
namespace Tests\Feature;
use App\Exceptions\DuplicateGameAccountException;
use App\Services\AzerothCoreAccountRegistrar;
use App\Services\VMangosAccountRegistrar;
use App\Services\InviteCodeService;
use Closure;
use Mockery\MockInterface;
@@ -26,7 +26,7 @@ class LauncherRegistrationFeatureTest extends TestCase
->with('INVITE-1234', 'playerone', \Mockery::type(Closure::class))
->andReturnUsing(fn (string $code, string $username, Closure $callback): array => $callback());
});
$this->mock(AzerothCoreAccountRegistrar::class, function (MockInterface $mock): void {
$this->mock(VMangosAccountRegistrar::class, function (MockInterface $mock): void {
$mock->shouldReceive('register')
->once()
->with('playerone', 'player@example.com', 'Pass1234')
@@ -77,7 +77,7 @@ class LauncherRegistrationFeatureTest extends TestCase
->once()
->andReturnUsing(fn (string $code, string $username, Closure $callback): array => $callback());
});
$this->mock(AzerothCoreAccountRegistrar::class, function (MockInterface $mock): void {
$this->mock(VMangosAccountRegistrar::class, function (MockInterface $mock): void {
$mock->shouldReceive('register')
->once()
->andThrow(DuplicateGameAccountException::forUsername());