the browser-facing portion of osu!
at master 28 lines 757 B view raw
1<?php 2 3// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. 4// See the LICENCE file in the repository root for full licence text. 5 6declare(strict_types=1); 7 8namespace Tests\Transformers; 9 10use App\Models\User; 11use App\Models\UserContestEntry; 12use App\Transformers\SeasonalBackgroundTransformer; 13use Tests\TestCase; 14 15class SeasonalBackgroundTransformerTest extends TestCase 16{ 17 public function testBasic(): void 18 { 19 $entry = UserContestEntry::create([ 20 'hash' => hash('sha256', ''), 21 'user_id' => User::factory()->create()->getKey(), 22 ]); 23 24 $json = json_item($entry, new SeasonalBackgroundTransformer()); 25 26 $this->assertNotNull($json['url']); 27 } 28}